Link to home
Start Free TrialLog in
Avatar of k_rasuri
k_rasuri

asked on

Create table from metadata??

Im working on creating a table from the meta data stored in someother table. is there any easy or anyway doing this. i tried and gave up.

here is how metadata table looks like

TABNAME  COLNAME  DATATYPE   LENGTH
usaall              regionid           int            NULL
usaall         region               varchar      60
usaall              account        varchar            50

from the above metadata i want to create a table called USAALL with the columns mentioned.
Avatar of nmcdermaid
nmcdermaid

SELECT *
INTO YourNewTable
FROM YourExistingTable
WHERE 1=0


Will create an empty table called YourNewTable with similar meta data to YourExistingTable
ASKER CERTIFIED SOLUTION
Avatar of nmcdermaid
nmcdermaid

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial