我缺少什么?
create table Diver(
diver_number int primary key check(diver_number>0) not null,
first_name char(30) not null,
last_name char(30) not null,
fullname AS first_name+' '+last_name,
bithdate date not null,
email nchar(100) not null,
diver_password char(8) not null check(Len(diver_password) = 8
AND diver_password not like('%[^a-z0-9]%')),
diver_signature nchar(200) not null,
signature_date date not null,
old_diving_diaries nchar(200))
insert into Diver VALUES('1111','Dana','shwartz','1966/04/11','[email protected] /cdn-cgi/l/email-protection','dana1234','http://www.google.co.il','')
我收到此错误:
列名称或提供的值的数量与表定义不匹配。
为什么?
是的,这个错误本身就很说明问题。您尝试将 8 个值插入到包含 10 列的表中。
考虑列出您想要显式插入的列名
insert into Diver (column names here)
VALUES('1111','Dana','shwartz','1966/04/11','[email protected] /cdn-cgi/l/email-protection','dana1234','http://www.google.co.il','')
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)