Professional Documents
Culture Documents
Create following two tables including integrity constraints using SQL Command:
Table Name : Student
Field Name
Data Type
Roll No
Number
Name
Text
Address
Text
Field Size
8
20
50
Constraints
Primary Key
Not Null
Field Size
8
Course
Grade
20
1
Constraints
Foreign Key,
Primary Key
Primary Key
A,B,C,D,E
Text
Text
List all the Students enrolled for BBA and have grade A
Find the number of students enrolled in each course.
Q4. Consider EMP table and perform the following using SQL Commands
(i)
(ii)
(iii)
(iv)
(v)
update emp
set totalsal=salary+comm;
select name,salary from emp where salary >(select AVG(salary) from emp);