Table creation
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Table creation

  1. #1
    Join Date
    Aug 2007
    Location
    Cyberjaya,kuala lumpur
    Posts
    340

    Table creation

    H all,

    i am creating tables using dblinks.
    create table x as select * from x@dblink;
    i like to know if there any way to create the first 100 or 1000 rows from the table and then the next thousand rows

    thanks
    Gopu
    Thanks/Gopu

  2. #2
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    No sql is atomic its all or none.
    You need to use pl/sql for that use bulk collect and fetch 1000 rows at a time and commit

    regards
    Hrishy

  3. #3
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    That's why I miss SQL Copy command that much.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  4. #4
    Join Date
    Jan 2001
    Posts
    2,828
    Hi Pavb

    oops sorry you are right sqlplus copy command can do what you are trying to do gopu_g and no pl/sql coding required.

    regards
    Hrishy

  5. #5
    Join Date
    Aug 2007
    Location
    Cyberjaya,kuala lumpur
    Posts
    340
    Hi,

    pavb i will try wiht the suggestion you given, if again some problems occur means we can go with pl/sql

    thanks
    pavb and Hrishy
    Thanks/Gopu

  6. #6
    Join Date
    Nov 2008
    Posts
    2
    You can create only few rows or as per your need by this comand. create table x as select * from x@dblink where rownum<=100;
    enjoy!

  7. #7
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    Quote Originally Posted by rajeshgoswami
    You can create only few rows or as per your need by this comand. create table x as select * from x@dblink where rownum<=100;
    enjoy!

    really - think about your answers and then see what what ou have said is stupid

  8. #8
    Join Date
    Nov 2008
    Posts
    9
    Quote Originally Posted by hrishy
    Hi

    No sql is atomic its all or none.
    You need to use pl/sql for that use bulk collect and fetch 1000 rows at a time and commit

    regards
    Hrishy
    there is a little mistake, this is DDL, need not commit command.
    hehe

  9. #9
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    whats DDL? - there is no DDl in what hrishy said

  10. #10
    Join Date
    Nov 2008
    Posts
    9
    hehe
    "create table x as select * from x@dblink;"
    this is a ddl.
    the 2nd thread which hrishy said is the reply to the 1st thread

Posting Permissions

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



Click Here to Expand Forum to Full Width