Dear Kevin,

> an option on mysqldump that would limit the number of records.  Any
ideas
> without writing a program?

AFAIK you cannot do this with mysqldump. But you can use the SELECT ...
INTO OUTFILE syntax, in some way like this:

    SELECT * FROM my_table INTO OUTFILE "some_records" WHERE id BETWEEN
200 AND 400

or (from the manual ;-)

SELECT a,b,a+b INTO OUTFILE "/tmp/result.text"
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    LINES TERMINATED BY "\n"
    FROM test_table
    WHERE id BETWEEN 200 AND 400

Check: http://www.mysql.com/doc/S/E/SELECT.html

Regards,

--
  Stefan Hinz
  Geschäftsführer / CEO iConnect e-commerce solutions GmbH
  #  www.js-webShop.com www.iConnect.de
  #  Gustav-Meyer-Allee 25, 13355 Berlin
  #  Tel: +49-30-46307-382  Fax: +49-30-46307-388

----- Original Message -----
From: "Kevin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 5:30 PM
Subject: WANTED: Utility to reverse engineer existing database II


>
> Thanks for pointing out mysqldump.
>
> I now need to be able to copy a limited number of data records.  I see
that
> mysqldump allows data copy by providing the cooresponding INSERT
statements.
> However, I don't always want all of the records.  Some of my tables
have
> thousands of records and I may only want the first 200 or so.  I did
not see
> an option on mysqldump that would limit the number of records.  Any
ideas
> without writing a program?
>
> Kevin
>
> > -----Original Message-----
> > From: Kevin [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, August 06, 2001 4:58 PM
> > To: [EMAIL PROTECTED]
> > Subject: WANTED: Utility to reverse engineer existing database
> >
> >
> >
> > I need a utility that will probe my existing mysql database,
> > analyze the 90+
> > tables and spit out the data definition language (create table,
create
> > index, etc.) needed to recreate the database.  Does such a utility
exist?
> >
> > Kevin
> >
> >
>
> ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> > <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php
> >
> >
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to