Q18. Create A Table Named As STUDENT With The Following Fields As
Q18. Create A Table Named As STUDENT With The Following Fields As
Q18. Create A Table Named As STUDENT With The Following Fields As
Q18. Create a table named as STUDENT with the following fields as:
S_no
Name
State
Age
Marks
Execute the following queries after entering 10 records in the table.
Display all the details of the given table
Display the name along with the marks where marks are greater than 60
Display the name of students whose name starts with letter ‘A’.
DATABASE VIEW
Name
Marks
Display the name and S_no of those students who have scored marks equal to 95
Display the names and marks of all those students who have scored marks between
75 and 90.
Ans
DATABASE VIEW
S_no of those students whose names starts with L and ends with A or marks less than 70
ISM LAB 03213701717
Name and S_no of those students who have scored marks equal to 95
Names and marks of all those students who have scored marks between 75 and 90.
ISM LAB 03213701717
DATABASE VIEW
ISM LAB 03213701717
DATABASE VIEW
ISM LAB 03213701717
Q22. Create the following table CUSTOMER having the columns, data types.
Insert the data into table Customer. And apply the queries:
Display customer details having designation Sales Representative
Ans.
TABLE DESIGN VIEW
DATABASE VIEW
ISM LAB 03213701717
Emp_name
Dept_name
Salary
Add
Date of joining
2. Delete the record of the employees whose Dept_name is HR and salary <10000
3. Delete the record of the employee whose name begins with S or salary >10000
Update the record of the employee, set salary to 15000 where Dept_name is IT.
Ans.
DATABASE VIEW
ISM LAB 03213701717
ISM LAB 03213701717
Delete the record of the employees whose Dept_name is HR and salary <10000
Delete the record of the employee whose name begins with S or salary >10000
ISM LAB 03213701717
Update the record of the employee, set salary to 15000 where Dept_name is IT
ISM LAB 03213701717
Emp_name
Contact no.
Gender
Salary
Emp_grade
Designation
Address
4. Display the details of the employee whose address is D-29, IITM, JANAKPURI.
5. Display the name of the employees whose salary is greater than 10,000.
6. Update the employee details, set EMP_GRADE equal to C whose salary is less than
10000.
7. Delete the record of the employee whose gender is male and designation is manager
8. Display the name, designation, and salary of all the employees whose names begins
with A.
9. Update the employee details; set designation to assistant manger where designation
is trainee.
Display the employee id, name, salary and designation for the employees where emp_grade
is A.
Ans.
Display the details of the employee whose add ress is D-29, IITM, JANAKPURI
Display the name of the employees whose salary is greater than 10,000
Update the employee details, set EMP_GRADE equal to C whose salary is less than 10000
ISM LAB 03213701717
Delete the record of the employee whose gender is male and designation is manager
Display the name, designation, and salary of all the employees whose names begins with A
Update the employee details; set designation to assistant manger where designation is
trainee
ISM LAB 03213701717
Display the employee id, name, salary and designation for the employees where emp_grade
is A
ISM LAB 03213701717
Student name
Address
Phone no
Grade
Now create another table named as BBA_M2 with the same field’s. Add
atleast 10 records to the table BBA_M1 (with first 10 enrollment nos and
BBA_M2 with next 10 e_no) and then perform the following queries on it.
1. Create a make table query which contains the A grade students from
BBA_M1
Append the A grade holders from BBA_M2 to the newly created table in the
above query.
Ans.