0
Write a SQL statement to create table named student with attributes and constrain given beloe
Name,text(30),not null age, int, >10 gender, char(1), 'm' or 'f'
2 Answers
0
create table T_STUDENTS_STU
(
STU_ID int identity(1,1), //SQL SERVER
STU_ID int auto-increment, //MYSQL
STU_NAME varchar(30),
STU_OLD int,
STU_GENDER varchar(1),
CONSTRAINT PK_STU Primary Key STU_ID
)
in my opinion u should check by your code that year < 10
or gender is "m" or "f"
it's easier by this way ! (it's my opinion)
0
ty