Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

generate script for filling table

marcoJun 9 2011 — edited Jun 9 2011
Hi all,

I've got table at test Oracle server table1 with columns ID, BTYPE, MYDESCRIPTION. Rows of this table have been inserted manually. Now my need is to write script for creating table (structure + data). I think about writing something like

CREATE TABLE table 1
AS
SELECT 1 AS ID, 'TYPE1' AS BTYPE, 'SOME TEXT' AS MYDESCRIPTION
UNION ALL
SELECT 2 AS ID, 'TYPE2' AS BTYPE, 'SOME TEXT 2' AS MYDESCRIPTION

But rows are too many to type... Could you please suggest some way of generating script for creating table at working server using existing table at test server? The problem is I don't have an access to working server.

Thanks ahead.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 7 2011
Added on Jun 9 2011
5 comments
237 views