-2
我如何使用檢查約束?我如何使用檢查約束?
create table tblCourseMaster
(
course_id int identity(1,1) primary key,
course_code varchar(10)not null,
course_name varchar(50),
course_duration int check(course_ duration>0 and course_duration <6)
)
我得到以下錯誤
在上下文指定的非布爾型,其中一個條件是預期的,鄰近「持續時間」的表達式。