Dump table as INSERTs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • D.Stone@ed.ac.uk

    Dump table as INSERTs

    Is there an easy way to create a SQL script to re-create and re-
    populate a table?
    Both Enterprise Manager 8.0 and Management Studio Express 2005 will
    generate the CREATE TABLE, but they only seem to produce a generic
    INSERT statement with place-holders instead of values. Not ideal for
    any table with more than 10 rows!

    Cheers,

    Dave
  • Pasi Oja-Nisula

    #2
    Re: Dump table as INSERTs

    On 2008-04-16, D.Stone@ed.ac.u k <D.Stone@ed.ac. ukwrote:
    Is there an easy way to create a SQL script to re-create and re-
    populate a table?
    Both Enterprise Manager 8.0 and Management Studio Express 2005 will
    generate the CREATE TABLE, but they only seem to produce a generic
    INSERT statement with place-holders instead of values. Not ideal for
    any table with more than 10 rows!
    Yes, it's handy for those cases where you have some rows but not
    really much, since then you need bcp anyway.

    I'm using Aqua Data Studio and it has export data functionality
    where you can select the table and it creates the inserts. Or you
    can also script the table and inserts at the same time.

    I'm sure lots of other database management ide/toolbox/whatever products
    have similar options available. It actually is useful to invest some
    time in trying out these external utilities. After using ADS for some
    years, there's no way I'm going back to Enterprise manager or
    SQL Management studio.

    Pasi

    Comment

    Working...