Re: explain a prepared statement
Posted by:
Rick James
Date: March 14, 2011 06:22PM
mysql> use database_test;
mysql> SET @test_parameter = "xxx";
mysql> SELECT * from table1, table2 where field1= @test_parameter and ....
or
mysql> use database_test;
mysql> SELECT * from table1, table2 where field1= "xxx" and ....
also
mysql> use database_test;
mysql> EXPLAIN SELECT * from table1, table2 where field1= "xxx" and ....
In other words, don't do PREPARE and EXECUTE. Those are reserved for STORED PROCEDUREs, and are used in certain APIs.
Subject
Views
Written By
Posted
3364
March 09, 2011 07:07AM
1549
March 13, 2011 02:13PM
3489
March 14, 2011 07:11AM
Re: explain a prepared statement
2008
March 14, 2011 06:22PM
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.