Skip to content
Advertisement

How create table with name which name in another table

There is a table in which all the names of the tables are located and I need to create a table with a name from it.

I give id to the input of the stored procedure and by this number I need to pull the name from another table

result some

I need create database schema3.Users.

And this table must have fields where need add this schema

how can i create table with Name with i need get from select?

Advertisement

Answer

The easiest way to create your table would be to build the required sql string and execute it. It would look something like the following (untested):

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement