Mysql Create Table

Hello All,
Have another(wierd) problem :wink:

I need to create a table test_table_1 where ‘1’ is the value returned by MySql’s “LAST_INSERT_ID()” function.

So suppose I insert a record into a table temp_table then if i Execute

SET @IDX=(SELECT LAST_INSERT_ID() FROM temp_table LIMIT 1);
CREATE TABLE test_table_@IDX(id INTEGER)

at the MySql Prompt,it does not work and gives an error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@idx(`id` integer)' at line 1

Is Something like this possible in Mysql.
I need to do this only through Mysql query

Thanks in advance…

Sponsor our Newsletter | Privacy Policy | Terms of Service