MySQL Forums
Forum List  »  Newbie

How can I create a table with variable table names
Posted by: Shilpa S
Date: March 16, 2020 06:19AM

I would like to create a number of tables and the table names are to be read from a parameter.
Ex:
1064 - 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 'table “,@tbl,” (a INT NOT NULL DEFAULT ’0′ ”) ENGINE=INNODB DEFAULT CH' at line 1

How can i do something like this ?
Currently it gives me a syntax error

Options: ReplyQuote


Subject
Written By
Posted
How can I create a table with variable table names
March 16, 2020 06:19AM


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.