primary-unique.test 420 字节
Newer Older
羽飞's avatar
羽飞 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
-- echo initialization
CREATE TABLE unique_table(id int, col1 int, col2 int);
INSERT INTO unique_table VALUES (1,1,1);

-- echo 1. unique test
CREATE UNIQUE INDEX index_id on unique_table(id);
INSERT INTO unique_table VALUES (2,1,1);
CREATE UNIQUE INDEX index_id on unique_table(id);
INSERT INTO unique_table VALUES (3,2,1);
INSERT INTO unique_table VALUES (1,2,1);

-- echo 2. select
-- sort SELECT * FROM unique_table;