Sunday, March 25, 2012

Create Table

Can I create a table from another table? If so how. In Oracle the syntax is:
Create table new_table as select * from table
ThanksSELECT * INTONewTable FROM OldTable|||I thought it was that easy. Thanks.|||And if you only want the structure, not the data

select * into newtable from oldtable where 0=1

HTH|||be aware thet using "select * into new table From Table" will create the same structure without indexes defaults and identity fields|||Thanks.sql

No comments:

Post a Comment