朋友您好,当我尝试在数据类型为“日期”的表中创建列时,它给我错误,我无法在此处添加它,这是我的代码
Create table Orders (
Order_ID INT Primary Key,
Book_name varchar(100) ,
isbn varchar(100) ,
Customer_ID INT Foreign key references Customer,
Order_date date,
);
我还需要另一件事来获取某个东西的日期,然后再创建它
更清楚地说:询问的查询指示查找8月2日之前的日期我该怎么做
我试图像这样输入数据
Insert Into Orders(Order_ID, Book_name, isbn, Customer_ID, Order_date) values (1, 'Design User Interface',9345678210123, 1, '02-08-2015');
Insert Into Orders(Order_ID, Book_name, isbn, Customer_ID, Order_date) values (2, 'Fire',9654693261489, 1, '05-08-2015');
Insert Into Orders(Order_ID, Book_name, isbn, Customer_ID, Order_date) values (3, 'The Odyssey',9654864332511, 2, '01-08-2015');
Insert Into Orders(Order_ID, Book_name, isbn, Customer_ID, Order_date) values (4, 'Anatomy',9654877777755, 2, '30-07-2015');
Insert Into Orders(Order_ID, Book_name, isbn, Customer_ID, Order_date) values (5, 'Surgery',9654864951753, 2, '01-07-2015');
但是,它只接受前3个插入,后两个却给我错误:/
相关分类