Danh mục

Mysql your visual blueprint for creating open source databases- P10

Số trang: 20      Loại file: pdf      Dung lượng: 715.73 KB      Lượt xem: 14      Lượt tải: 0    
Hoai.2512

Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Mysql your visual blueprint for creating open source databases- P10:The show tables command displays a list of tables available in the currently selected database. You can use this command when you are unsure of the exact name of a table within the database.
Nội dung trích xuất từ tài liệu:
Mysql your visual blueprint for creating open source databases- P10 IMPORT AND EXPORT DATA 8 You can also import a text file you created with the SELECT INTO OUTFILE option in MySQL into Microsoft Access. To import a text file, select Get External Data, and then Import from the File menu. From the file selection dialog box, select Text Files as the file type. Select the text file to import and click OK. Access now starts the Import Text Wizard to prompt you for information about the text file. In the first dialog box, choose between Delimited and Fixed width fields. Choose Delimited for most MySQL export files. You can also choose a starting row for the import. Click Next to display the next dialog box. Choose the character that delimits the fields, typically Tab for MySQL files. You can also choose Text Qualifier if your text file encloses fields in quotation marks. Click Next to continue. In the next dialog box, choose whether to add the data to a new table or an existing table in the current database. Click Next to display another dialog box, which prompts you for the name and data type of each field. The next dialog box lets you choose a field to act as primary key. Finally, enter a table name and click Finish to complete the import.Á From the Export Text ‡ Click Next to continue. ° Select Tab as the ‚ Click Next.Wizard, select the Delimited delimiting character.option. — Click Finish to save the · Select none as the Text file. Qualifier option. s You can now import the resulting text file into MySQL. 167 MySQLBACK UP DATA FROM A TABLE mysqldump -B db1 db2W hile you can export data to a text file using SELECT and the INTO OUTFILE option, this The mysqldump utility always includes all of the columns process creates a simple text file. MySQL includes of each table. You can specify the format of the text outputa separate utility, mysqldump, that you can use from the using several options: --fields-terminated-by,command line to back up a database to a text file. The --fields-enclosed-by, --fields escaped by,output file includes SQL statements and can be used to and --lines-terminated-by. These are the same as therebuild the database or tables. options for the LOAD DATA command, described earlier inTo use mysqldump, specify a database name and one or this chapter.more table names. The following example dumps the mail This utility supports the same -u and -p options as theand address tables from the testdb database: mysql command. You will usually need to use thesemysqldump testdb mail address options to specify a username with access to the tables you are dumping and the correct password.If you do not specify table names, mysqldump will dumpthe entire database. You can also back up more than one The mysqldump utility does not create a text file by itself —database by specifying the -B option and a list of databases. it normally dumps the text to the standard output at theIn this case, you cannot specify particular table names. The shell prompt. You can use the > operator from thefollowing example backs up the db1 and db2 databases: ...

Tài liệu được xem nhiều: