Operand type clash: int is incompatible with date + The INSERT statement conflicted with the FOREIGN KEY constraint

前端 未结 4 738
悲&欢浪女
悲&欢浪女 2020-12-11 00:03
create table pilot (
emp_num int,
pl_license varchar (3),
pl_ratings varchar (30),
pl_med_type int,
pl_med_date date,
pl_pt135_date date,
constraint PK_pilot primary         


        
4条回答
  •  醉梦人生
    2020-12-11 00:44

    FYI this turned out to be an issue for me where I had two tables in a statement like the following:

    SELECT * FROM table1
    UNION ALL
    SELECT * FROM table2
    

    It worked, but then somewhere along the line the order of columns in one of the table definitions got changed. Changing the * to SELECT column1, column2 fixed the issue. No idea how that happened, but lesson learned!

提交回复
热议问题