Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

dbf2mysql parameter, WWWXXXAPC, wwwxxxAPC, How to unsubscrube from dategen spam, docmd.close 2585, WWWXXXDOCO, nu vot, dhcpd lease file "binding state", WWWXXXDOCO, how to setup procmail to process html2text

Links

XODOX
Impressum

#1: Dump table as INSERTs

Posted on 2008-04-16 17:00:25 by D.Stone

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

Report this message

#2: Re: Dump table as INSERTs

Posted on 2008-04-16 22:05:51 by Pasi Oja-Nisula

On 2008-04-16, D.Stone@ed.ac.uk <D.Stone@ed.ac.uk> wrote:
> 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

Report this message