· 6 years ago · Jun 20, 2019, 08:38 PM
1DROP TABLE IF EXISTS mytable1;
2DROP TABLE IF EXISTS mytable2;
3DROP TABLE IF EXISTS mytable3;
4CREATE TABLE IF NOT EXISTS mytable1 (c1 CHAR_INT PRIMARY KEY);
5CREATE TABLE IF NOT EXISTS mytable2 (c1 INT PRIMARY KEY);
6CREATE TABLE IF NOT EXISTS mytable3 (c1 RUMPLEstiltSkin PRIMARY KEY);
7-- INSERT INTO mytable1 VALUES(12345),('12345'),('a_12345'),('1_12345'),(x'0102030405'); -- fails due to unique constraint 12345 and '12345' are the same
8-- INSERT INTO mytable2 VALUES(12345),('12345'),('a_12345'),('1_12345'),(x'0102030405'); -- fails due to unique constraint 12345 and '12345' are the same
9-- INSERT INTO mytable3 VALUES(12345),('12345'),('a_12345'),('1_12345'),(x'0102030405'); -- fails due to unique constraint 12345 and '12345' are the same
10INSERT INTO mytable1 VALUES(12345),('54321'),('a_12345'),('1_12345'),(x'0102030405');
11INSERT INTO mytable2 VALUES(12345),('54321'),('a_12345'),('1_12345'),(x'0102030405');
12INSERT INTO mytable3 VALUES(12345),('54321'),('a_12345'),('1_12345'),(x'0102030405');
13SELECT c1, typeof(c1) FROM mytable1;
14SELECT c1, typeof(c1) FROM mytable2;
15SELECT c1, typeof(c1) FROM mytable3;