What is the method of creating a student table with SQL statements
The editor will share with you what is the method of creating a student table with SQL sentences. I hope you will gain a lot after reading this article. Let's discuss it together.
The code for creating a student table using SQL statements in the database is as follows:
(student number char (12) primary key, name char (6) not null, gender char (2) check (gender IN ('male', 'female'), class char (15))
Creation of related tables:
Create table score sheet (student number char (12) references student table (student number), course number char (2) references curriculum schedule (course number), grade int default (30), primary key (course number, course number) create table curriculum schedule (course number char (2) primary key, course name char (20), credit int check (credit > = 1 and credit)