12

In OpenOffice / LibreOffice I'm used to added :prefixed-parameter-names to my queries.

For example:

SELECT name FROM table1 WHERE id = :id

Is there a similar functionality in MySQL Workbench?

1 Answer 1

18
SET @given_id = 1;
SELECT name FROM table1 WHERE id = @given_id ;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.