tailieunhanh - Mastering phpMyAdmin 2.8 for Effective MySQL Management 3rd phần 5

Các tùy chọn trong phần cấu trúc là: • Thêm tiêu đề tùy vào nhận xét: Chúng ta có thể thêm ý kiến của riêng của chúng tôi cho xuất khẩu này (ví dụ, 'Hàng tháng backup') nào sẽ hiển thị trong các tiêu đề xuất (sau khi số phiên bản PHP). Nếu những nhận xét bạn có nhiều hơn một dòng, chúng tôi sử dụng các ký tự đặc biệt Phải \ n để riêng biệt mỗi dòng. | Exporting Structure and Data -SQL options Add custom comment into header An splits lines r Enclose export in a transaction r Disable foreign key checks SQL export compatibility I NONE 3 - 7 Structure r Add DROP TABLE r Add IF NOT EXISTS 7 Add AUTOJNCREMENT value 7 Enclose table and field names with backquotes Add into comments r Creation Update Check dates r 7 Data 7 Complete inserts 7 Extended inserts Maximal length of created query 50000 r Use delayed inserts r Use ignore inserts 17 Use hexadecimal for binary fields Export type INSERT 3 The options in Structure section are Add custom comment into header We can add our own comments for this export for example Monthly backup which will show in the export headers after the PHP version number . If the comment has more than one line we must use the special character n to separate each line. Enclose export in a transaction Starting with MySQL we can use the START TRANSACTION statement. This command combined with SET AUTOCOMMIT 0 at the beginning and COMMIT at the end asks MySQL to execute the import when we will re-import this file in one transaction ensuring that all the changes are done as a whole. Disable foreign key checks In the export file we can add DROP TABLE statements. However normally a table cannot be dropped if it is referenced in a foreign key constraint. This option overrides the verification by adding SET FOREIGN_KEY_CHECKS 0 to the export file. SQL export compatibility This lets us choose the flavor of SQL that we export. We must know about the system on which we intend to import this file. Among the choices are MySQL MySQL Oracle and ANSI. 110 Chapter 7 Add DROP TABLE Adds a DROP TABLE IF EXISTS statement before each CREATE TABLE statement for example DROP TABLE IF EXISTS authors This way we can ensure that the export file can be executed on a database in which the same table already exists updating its structure but destroying previous table contents. Add IF NOT EXISTS Adds the IF NOT

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.