The student details include the name of the students, Roll Number, Address, University Emailid and Mobile number(The for mat of the Roll Number is as follows. Department Name in Two Letters (CS for Computer Science and Engineering, AM for AI and Machine Learning and so on), one letter for denoting the course(M for MS course and P for PhD Course), two digit Roll number starting with 01.
CREATE TABLE STUDENT (
ROLL_NO CHAR(7) PRIMARY KEY CHECK(ROLL_NO LIKE '[A-Z][A-Z][M,P][0-9][0-9][01-99]'),
NAME VARCHAR(20),
ADDR VARCHAR(50),
SMOB_NO BIGINT CHECK (MOB_NO BETWEEN 1000000000 AND 9999999999),
SU_EMAIL VARCHAR(20)
);
and the error message shows:
Runtime error near line 13: CHECK constraint failed: ROLL_NO LIKE ‘[A-Z][A-Z][M,P][0-9][0-9][0-9]’ (19)
6