R-20
College Code: 09
Rajeev Gandhi Memorial College of Engineering & Technology
Autonomous
NANDYAL-518501
IV [Link] I-Semester - Mid-I Examinations
Structured Query Language
EEE
Max. Marks: 20 Date:19-08-2023 Time: 2 Hours
Note: 1. Answer first question compulsorily. (5 x 1 = 5 Marks)
2. Answer Any THREE from 2 to 5 questions. (3 x 5 = 15 Marks)
[Link] M CO BL
Q.1 a) How do you drop a table named "Departments"? 1M CO1 BL1
b) Write a SQL statement to create a new table
called "Students" with columns for "StudentID,"
"StudenName," and "Age." 1M CO2 BL1
c) How do you update the "Salary" of an employee
with "EmployeeID" 1 in the "Employees" table to
55000? 1M CO3 BL1
d) How do you retrieve all columns for the
"Employees" table where the "Salary" is greater
than 60000? 1M CO4 BL3
e) Write a SQL query to retrieve all employees from
the "Employees" table who are either in the
"Sales" department or have a salary greater than
60000. 1M CO3 BL2
Q.2 Write the SQl Query for creating input table and
find the output table values 5M CO1 BL3
S.I MID- MID- ASSG MID- MID- TOTAL
[Link] ASSG-1 ASSG-2
D 1 2 -AVG HIGHEST LOWEST MARKS
1 SESI 10 9 18 15
2 ramu 8 9 16 15
3 RAJESH 6 4 16 12
Q.3 Explain the following terms with example tables.
a. Insert b. Update [Link] [Link]
5M CO2 BL3
Q.4 a) Write the outputs of given SQL query.
i. select SQUARE(9)
ii. select SQRT(64)
iii. select POWER (4, 6) 2M CO4 BL3
b) Write the outputs of given SQL query.
i. Select CHARINDEX ('A','SUDHAKAR')
ii. Select LEN ('WELCOME NARA')
iii. Select LOWER ('sai') 3M CO3 BL3
Q.5 a) Write the Rules for Creating a Table. 2M CO2 BL1
Page 1 of 2
b) What is the difference between DELETE and
TRUNCATE statements? 3M CO2 BL1
Page 2 of 2