Hello. On Wed 2002-06-05 at 08:08:32 -0600, [EMAIL PROTECTED] wrote: > Hello, > > IS it possible to export a query from mysql in a specific format. > I created a query- SELECT id,title,class,grade FROM semester1; \T > semester1 > but it exported the query in a table form. > > Can anyone tell me if you can export the query in another format----Tab > delimited,cvs etc.
RTFM! A search for "TAB" in the online manual find this as second hit: http://www.mysql.com/doc/m/y/mysql.html which explains how to get a tab-delimited output Also: shell> mysql --help mysql Ver 11.11 Distrib 3.23.31, for pc-linux-gnu (i686) [...] -B, --batch Print results with a tab as separator, each row on a new line. Doesn't use history file. -e, --execute=... Execute command and quit. (Output like with --batch) -r, --raw Write fields without conversion. Used with --batch shell> mysqldump --help mysqldump Ver 8.12 Distrib 3.23.31, for pc-linux-gnu (i686) [...] -T, --tab=... Creates tab separated textfile for each table to given path. (creates .sql and .txt files). NOTE: This only works if mysqldump is run on the same machine as the mysqld daemon. [...] Use -T (--tab=...) with --fields-... --fields-terminated-by=... Fields in the textfile are terminated by ... --fields-enclosed-by=... Fields in the importfile are enclosed by ... --fields-optionally-enclosed-by=... Fields in the i.file are opt. enclosed by ... --fields-escaped-by=... Fields in the i.file are escaped by ... If it is not obvious, the latter is used to create CSV files. Bye, Benjamin. -- [EMAIL PROTECTED] --------------------------------------------------------------------- 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