+ Reply to Thread
Results 1 to 3 of 3

Thread: Can You Copy a Table in SQL?

  1. #1

    Default Can You Copy a Table in SQL?

    If you want create new table TBLNEW based on existing TBLOLD, run SELECT statement to outfile(F13 0pt1 then Opt3)with all fields you need. If you need different names in TBLNEW use LABLE ON(OFF) on new table or use alias names in your SELECT statement: SELECT OLDF1 NEWF1, OLDF2 NEWF2 ..... FROM TBLOLD.

  2. #2
    Guest.Visitor Guest

    Default Can You Copy a Table in SQL?

    I've researched some SQL texts and searched the forum for an answer to this question but no luck. Can you copy a table in SQL similar to the procedure in DDS? I thought there was an SQL enhancement that would allow you to do this but can't find the reference. I would like to copy an existing table and rename it as it contains the fields needed in the second table. TIA, Bob

  3. #3
    Guest.Visitor Guest

    Default Can You Copy a Table in SQL?

    Thanks, UKP. I also got a reply in another forum to do this: CREATE TABLE NEWTABLE LIKE OLDTABLE However, it only works in V5. Bob

+ Reply to Thread

Similar Threads

  1. Update a Table From Another Table?
    By Guest.Visitor in forum SQL
    Replies: 6
    Last Post: 03-03-2006, 02:31 AM
  2. Copy table/database file between 2 LPAR
    By Guest.Visitor in forum General
    Replies: 2
    Last Post: 01-09-2006, 11:34 AM
  3. Replies: 2
    Last Post: 10-10-2002, 12:30 PM
  4. Getting Lib Table of contents
    By Guest.Visitor in forum Analysis
    Replies: 16
    Last Post: 11-15-2000, 11:09 AM
  5. How to copy the BOOTP table ?
    By Guest.Visitor in forum Networking
    Replies: 1
    Last Post: 11-01-2000, 03:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts