libdb/test/sql_codegen/data/constraints_name_conflict_with_column.sql

14 lines
465 B
MySQL
Raw Normal View History

2011-09-13 17:44:24 +00:00
CREATE DATABASE numismatics;
CREATE TABLE coin (cid INT(8) PRIMARY KEY,
unit VARCHAR(20),
value NUMERIC(8,2),
mintage_year INT(8),
mint_id INT(8),
CONSTRAINT unit FOREIGN KEY(mint_id)
REFERENCES mint(mid));
CREATE TABLE mint (mid INT(8)PRIMARY KEY,
country VARCHAR(20),
city VARCHAR(20));