Example:
Create sample tables like Student, Class etc.,
Queries:
STUNDENT Table:
CLASS Table:
TEACHERTable:
STUNDET_CLASS relation Table:
Create sample tables like Student, Class etc.,
Queries:
STUNDENT Table:
CREATE TABLE STUDENT
(
STUDENT_ID INT,
FIRST_NAME VARCHAR(25),
LAST_NAME VARCHAR(25),
FATHE_NAME VARCHAR(25),
ADDR VARCHAR(400),
PHONE BIGINT
)
CLASS Table:
CREATE TABLE CLASS
(
CLASS_ID INT,
CLASS_TEACH_ID INT
)
TEACHERTable:
CREATE TABLE TEACHER
(
TEACHER_ID INT,
FIRST_NAME VARCHAR(25),
LAST_NAME VARCHAR(25),
ADDR VARCHAR(400),
PHONE BIGINT
)
STUNDET_CLASS relation Table:
CREATE TABLE STUDENT_CLASS
(
STUDENT_ID INT,
CLASS_ID INT
)