create table 员工信息表
(员工编号 int not null constraint c1 primary key,
员工姓名 char(10) not null,
出生日期 date not null,
性别 char(2) not null,
文化程度 char(10) null ,
婚否 char(4) not null constraint c2 check(婚否 = '未婚' or 婚否 = '已婚'),
constraint c3 unique(出生日期,文化程度),
constraint c4 default '未知' for 文化程度
)
在c4约束时老是提示我for附近有语法错误,真是奇怪拉.我是按讲座上作的啊.谁能指点一下?!
(员工编号 int not null constraint c1 primary key,
员工姓名 char(10) not null,
出生日期 date not null,
性别 char(2) not null,
文化程度 char(10) null ,
婚否 char(4) not null constraint c2 check(婚否 = '未婚' or 婚否 = '已婚'),
constraint c3 unique(出生日期,文化程度),
constraint c4 default '未知' for 文化程度
)
在c4约束时老是提示我for附近有语法错误,真是奇怪拉.我是按讲座上作的啊.谁能指点一下?!
解决方案 »
- sql server2005安装问题
- 有没有简单的方法动态声明游标,就是声明和使用的游标名称每一次都不一样
- 时间转换字符串
- 删除表中多个字段重复的记录,只保留一条。注:有多个索引!
- ReportingService 部署問題
- 安装问题,急.......
- ???如何把表里数据按照某个条件排序,然后依次递增编号,把这个编号放到某个column里
- 用convert function 怎样把一个日期时间转换为只有日期?
- 在visual foxpro6中使用ADO控件时如何将查询结果显示在data或Grid中
- 超难度的问题:按条件查4个表(其中有的表中有些人的数据是没有的)输入到另一表里。
- 由于初始数据库设计的问题,导致现在很郁闷啊,以前数据库设计就没学好呀,痛苦~~求救
- 两个表字段不同,怎么从一个表和一个常量向另一个表里插入数据
(员工编号 int not null constraint c1 primary key,
员工姓名 char(10) not null,
出生日期 datetime not null,
性别 char(2) not null,
文化程度 char(10) null default '未知',
婚否 char(4) not null constraint c2 check(婚否 = '未婚' or 婚否 = '已婚'),
constraint c3 unique(出生日期,文化程度)
)
constraint c4 default '未知' for 文化程度
这样创建么?