circle.ch weblog by Urs Gehrig

 Search
A weblog about libre software, law, technology, politics and the like.
2013-06-17T21:58:57
Academic, Android, Apache, Apple, Art, Best Of, Biotech, Civil Society, Content Management, Cooking, Copyright, Creative Commons, Crosspost, Culture, Database, Deutsch, DRM, Economy, Education, Event, Gadget, General, Geodata, Government, Health, Howto, Humor, Innovation, Intellectual Property, Java, Language, LaTeX, Law, Linux, Media, Moblog, Mozilla, Music, Office, Open Content, Open Source, P2P, PHP, Podcast, Politics, Privacy, Projects, Random Thought, Rant, Science, Search, Social Network, Software, Sport, Talks, Technology, Technology Transfer, Travelling, Weblog, Wiki, Wireless and Mobile, XML

26. January 2003

Dump specific row with mysqldump
@ 13:46:57

If you want to dump just certain rows of your table with mysqldump, you can perform the following command:

C:\tmp>mysqldump "--where=post_category='1'" -t dbname b2posts > dump.sql.txt

--- dump.sql.txt ---
# MySQL dump 8.16
#
# Host: localhost Database: dbname
#--------------------------------------------------------
# Server version 3.23.43-max-debug
#
# Dumping data for table 'b2posts'
# WHERE: post_category='1'
#

INSERT INTO b2posts VALUES (1,1,'2003-01-22 23:21:38','This is the first post. Edit or delete it, then start blogging !','Hello world !',1,0);


Leaving attribute "-t" away, will add the table structure to the dump as well [1].

[1] http://www.mysql.com/doc/en/mysqldump.html

Comments (0) Permalink del.icio.us

The URL to TrackBack this entry is:
   http://circle.ch/blog/b2trackback.php/581

Comments closed.



Werbung:

Beiträge von Dritten:

Nachfolgende Titel verweisen auf von mir gelesene Weblogs.

Feeds:

Blog Content
Blog Comments

WikiAgenda:

Comments:

Good question, but...
Hi, thank you very...
Unter http://www.s...
Ich weiss mir nich...
ThanQ matthias. Th...
in case you just w...
ich liebe dir, urs...
hi there, sorry i...
Hoi Leo. I haven'...
Do you know the si...

Archives:

Blog stack:

Bill Humphries
monorom
Wendy M. Seltzer
Christian Stocker
Roger Fischer
Sandro Zic
Wez Furlong
Ben Hammersley
George Schlossnagle
Joichi Ito
Lawrence Lessig
Derek Slater
Karl-Friedrich Lenz
John Palfrey
Bernhard A.M. Seefeld
Gregor J. Rothfuss
Rainer Langenhan
Elke Engel
Sebastian Bergmann
Simon Willison
Jeremy Zwaodny
Udo Vetter
Axel A. Horns
Miguel de Icaza
Andreas Halter
Silvan Zurbrügg
Hannes Gassert
Markus Koller


$Date: 2005/11/05 11:14:30 $