You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mssql_Study/create table with reference...

13 lines
305 B

USE Study
GO
CREATE TABLE orders(
oseq int IDENTITY(1, 1) CONSTRAINT PK_oseq PRIMARY KEY,
quantity VARCHAR(20) NULL,
indate DATETIME NULL,
id VARCHAR(20) CONSTRAINT FK_id REFERENCES customer(id)
)
INSERT INTO orders(quantity, id) VALUES(5, 'one')
INSERT INTO orders(quantity, id) VALUES(5, 'test')