Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2004
    Location
    VA
    Posts
    35

    Unanswered: How to copy a table to a new table without creating it manually

    Microsoft SQL Server allows you to copy an existing table to a new table without creating it manually. For example:

    Code:
        insert into new_authors
            select * from authors
    The new_authors table will have the same data definition as the authors table.

    Is there similar functionality in Oracle 10g?

  2. #2
    Join Date
    Feb 2007
    Posts
    3

    creating new table

    create table new_table as
    select * from old_table

  3. #3
    Join Date
    Dec 2004
    Location
    VA
    Posts
    35
    Perfect! Thanks!

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Note that none of the constraints (except the NOT NULL one), indexes or triggers will be created using that statement.

  5. #5
    Join Date
    Dec 2004
    Location
    VA
    Posts
    35
    Quote Originally Posted by Littlefoot
    Note that none of the constraints (except the NOT NULL one), indexes or triggers will be created using that statement.
    No problem. I'm just looking for a quick way to make a backup copy of data. SQL Server doesn't create constraints, indexes, etc. with its syntax either.

Posting Permissions

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