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'

3rd Nov 2016, 6:39 AM
Neha Habn
Neha Habn - avatar
2 Réponses
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)
3rd Nov 2016, 5:21 PM
Pierre Drt
0
ty
3rd Nov 2016, 6:05 PM
Neha Habn
Neha Habn - avatar