-
Dear friends,
Is anyone here who is willing to share a sql which will generate a 'create table..' script based on the existing table?
What I am trying to do is to maintain all storage paramentrs and rearrange the order of the columns in the table. The table is empty. No need to worry about data. My solution is to drop and re-create the table with a correct order of columns. I would generate a sql scipt for the existing table and change the columns around manually.
Thank you.
-
Rename table tablename to test;
now test has column a,d,f,c,b,e as columns in that order
create table tablename as select a,b,c,d,e,f from test;
drop test;
Radhakrishnan.M
-
If you use QUest Software's TOAD there is an option which let you generate these create table *scripts*
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|