TAILIEUCHUNG - MySQL Administrator's Bible- P4

MySQL Administrator's Bible- P4: Với tập trung đặc biệt vào việc phát hành lớn tiếp theo của MySQL, nguồn tài nguyên này cung cấp một khuôn khổ vững chắc cho bất cứ ai mới vào MySQL hoặc chuyển từ một nền tảng cơ sở dữ liệu, cũng như các quản trị MySQL kinh nghiệm. Các bộ đôi tác giả cao hồ sơ cung cấp bảo hiểm thiết yếu của các nguyên tắc cơ bản của phạm vi bảo hiểm cơ sở dữ liệu quản lý, bao gồm cả cách tiếp cận độc đáo MySQL của các tính năng cơ sở. | How MySQL Extends and Deviates from SQL 4 ENAB LE KEYS Enables automatic index updating and rebuilds all indexes on the table. Speeds up large data imports in conjunction with DISABLE KEYS. IGNORE If an ALTER TABLE statement results in a duplicate key error the table copy is stopped and the table is reverted to its original schema. All of the changes in the ALTER TABLE are lost even if the change did not cause the duplicate key error. When you specify IGNORE between ALTER and TABLE duplicate records that would cause such errors are deleted from the table. To see this behavior Ziesel copies her customer table mysql use sakila Database changed mysql CREATE TABLE customer_test LIKE customer Query OK 0 rows affected sec mysql INSERT INTO customer_test SELECT FROM customer Query OK 599 rows affected sec Records 599 Duplicates 0 Warnings 0 Now that she has a table with all 599 customers that she can test without destroying her production data Ziesel purposefully causes a duplicate key error so that she can later compare ALTER TABLE to ALTER IGNORE TABLE mysql SELECT COUNT active - FROM customer_test - GROUP BY active ----------- -------- COUNT active ----------- -------- 1 15 0 584 1 ----------- -------- 2 rows in set sec mysql ALTER TABLE customer_test ADD UNIQUE KEY active ERROR 1062 23000 Duplicate entry 1 for key active Now that she has caused a duplicate key error she compares the behavior of using the IGNORE keyword mysql ALTER IGNORE TABLE customer_test ADD UNIQUE KEY active Query OK 599 rows affected sec Records 599 Duplicates 597 Warnings 0 mysql SELECT COUNT active - FROM customer_test - GROUP BY active 117 Part II Developing with MySQL ------------ --------- COUNT active ------------ --------- I 1 0 1 1 1 ------------ --------- 2 rows in set sec mysql SELECT COUNT from customer_test ----------- COUNT ----------- 2 ----------- 1 row in set sec There were 597 duplicate keys that were deleted because of the ALTER IGNORE. Only two .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.