在我的两个表上插入一个带有关系键的记录时,我得到一个错误。下面是我的表格:
表名为tbl1
Ccode bigint, (autoincrement) (not null) ----->relationship with tbl2
customerId varchar(5), (not null)
CUstomerName varchar(50)表名为tbl2
User_Idx bigint, (autoincrement) (not null)
Ccode bigint, (autoincrement) (not null) ----->relationship with tbl1
callLogs bit, (yes/no or 0/1) (not null)
MyDateTime DateTime, (not null)
Duration smalldatetime,
Description varchar20下面是我的Insert查询,但没有工作:(
insert into tbl1 values ('5055','Vangelyn De Castro')
insert into tbl2 values ('1','01/26/16 08:40', '24:12:00','Incoming Call')发布于 2016-01-25 05:53:29
我认为这只是一个基本的模式问题。
带有ccode的表2不应该是自动递增的,因为table1保存ccode的唯一值。
table2 ccode bigint, (not null) -- that's it.https://stackoverflow.com/questions/34973262
复制相似问题