write for me an SQL
Budget: $10 – $15 USD
Write a SQL statement to create a table pupils including columns: pupil_id (number(7)), first_name (varchar2(255) )and last_name (varchar2(255)).
B. Design the table such that
1- Pupil’s first name cannot be empty.
2- No two pupils have the same first and last name. 3- Pupil id is primary key.
C. Write a SQL statement to create a table courses including columns: course_id (number(7)), tiltle(varchar2(100) and credit (number(3,2)).
1- Credit cannot be empty.
D. Write a SQL statement to create a table studies including columns: p_id , c_id and grade(number(3,2) . Where p_id references to pupil_id in pupil’s table.
E. Add column GPA to pupil table (number(1,2) )
F. Rename table studies to classes.
G. Add constraint on grade to not be more than 100 in classes table.
H. Add constraint on pupil’s Last name to not be empty in pupil table.
I. Set course id to be primary key in courses table.
J. Add constraint on c_id in classes table so that it references to course_id in courses table.
K. Display all columns information for all 3 tables. (desc ......).
L. Display constraint_name and constraint_type for all tables.
B. Design the table such that
1- Pupil’s first name cannot be empty.
2- No two pupils have the same first and last name. 3- Pupil id is primary key.
C. Write a SQL statement to create a table courses including columns: course_id (number(7)), tiltle(varchar2(100) and credit (number(3,2)).
1- Credit cannot be empty.
D. Write a SQL statement to create a table studies including columns: p_id , c_id and grade(number(3,2) . Where p_id references to pupil_id in pupil’s table.
E. Add column GPA to pupil table (number(1,2) )
F. Rename table studies to classes.
G. Add constraint on grade to not be more than 100 in classes table.
H. Add constraint on pupil’s Last name to not be empty in pupil table.
I. Set course id to be primary key in courses table.
J. Add constraint on c_id in classes table so that it references to course_id in courses table.
K. Display all columns information for all 3 tables. (desc ......).
L. Display constraint_name and constraint_type for all tables.