MySQL Forums
Forum List  »  MySQL Query Browser

Re: Multi-line queries
Posted by: Mike Lischke
Date: October 04, 2005 01:47AM

Frank Maas wrote:

> And for sake of avoiding complexity one
> wants to do
>
> SET @a=some_value;
>
> SELECT field FROM table WHERE special_field="@a";

A workaround for the current limitation is to use transactions. When you start a transaction then the current connection is reused and variables do work.

Mike

Mike Lischke, MySQL Developer Tools
Oracle Corporation

MySQL Workbench on Github: https://github.com/mysql/mysql-workbench
On Twitter: https://twitter.com/MySQLWorkbench
On Slack: mysqlcommunity.slack.com (#workbench)
Report bugs to http://bugs.mysql.com
MySQL documentation can be found here: http://dev.mysql.com/doc/refman/8.0/en/

Options: ReplyQuote


Subject
Written By
Posted
June 18, 2005 07:24PM
July 13, 2005 06:43AM
July 13, 2005 11:46PM
September 22, 2005 09:47AM
October 03, 2005 01:35AM
Re: Multi-line queries
October 04, 2005 01:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.