Hello:
I have to create a bunch of tables with the same 10 fields at the top. I would like to create one table with the original 10 fields and then copy it to the other 60 table. Is there an easy way, or do I have to create each one manually by entering the 10 fields?
Loading
Amit ChoudharyPosted Mar 15, 2010, 6:48 AM
Generate SqlScript for creating table structure with your 10 fields. use the same sql code just change table name execute it as many times as you wants.
mark as answer if get some hint.
GustavoPosted Mar 15, 2010, 7:30 AM
CREATE TABLE [Bin]
(
[SEQNO] INT NOT NULL IDENTITY (1 ,1 ) PRIMARY KEY,
[Status_ID] varchar(50),
[Class_ID] varchar(50),
[Group_ID] varchar(50),
[Type_ID] varchar(50),
[CreateBy] varchar(50),
[CreateDate] varchar(50),
[CreateTime] varchar(50),
[Note] varchar(MAX)
);
GustavoPosted Mar 15, 2010, 7:13 AM
CREATE TABLE Bank
(
[SEQNO] int NOT NULL AUTO_INCREMENT,
[Status_ID] varchar(50),
[Class_ID] varchar(50),
[Group_ID] varchar(50),
[Type_ID] varchar(50),
[CreateBy] varchar(50),
[CreateDate] varchar(50),
[CreateTime] varchar(50),
[Note] varchar(MAX),
PRIMARY KEY (SEQNO)
)
paul danielPosted Mar 15, 2010, 6:57 AM
http://www.java2s.com/Code/Oracle/Table/Createacopytableandinsertvaluetoit.htm
GustavoPosted Mar 15, 2010, 6:53 AM
Thanks... I was hoping to do it with a tool (GUI). Im not that good at SQLScripts, but it will save a lot of time. Thanks.
GustavoPosted Mar 15, 2010, 5:30 AM
They are MS SQL tables.
Amit ChoudharyPosted Mar 15, 2010, 5:29 AM
What kind of tables these are??