Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

On this page

EXECUTE

Updated on 2022-11-18 GMT+08:00

Syntax

EXECUTE statement_name [ USING parameter1 [ , parameter2, ... ] ]

Description

This statement is used to run the prepared SQL statement and use USING to specify input parameters.

Example

  • To run a precompiled statement without input parameters.
    PREPARE my_select1 FROM SELECT name FROM fruit;
    EXECUTE my_select1;
  • To run the SQL statement with two input parameters:
    PREPARE my_select2 FROM SELECT name FROM  fruit WHERE name= ? and price< ?;
    EXECUTE my_select2 USING  'peach',10;
    This is equivalent to:
    SELECT name FROM fruit WHERE name = 'peach' AND price<10;
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback