Skip to content

By urs in mysql questions

 

1. execute test;
2. deallocate prepare test;
3. prepare test from @a;
4. set @a:=concat('show create database ',ifnull(database(),'mysql'));

 
Which is the correct order?
 

a) 1,2,3,4
b) 4,3,2,1
c) 3,1,2,4
d) 4,3,1,2

 
Extra question: What does the prepared statement in the example actually do?
 
[ Prepared Statements (5%) - Using Prepared Statements from the mysql Client ]
 

Tags: , ,

Comment Feed

One Response


  1.  
    Answer:
     
    d
     
    The prepared statement of thw example will execute show create database for the current database (or for the mysql database if no current db was selected).
     

You must be logged in to post a comment.