- Information
- AI Chat
Was this document helpful?
Sqlqs - SQL
Course: Computer Engineering (310243)
7 Documents
Students shared 7 documents in this course
University: Savitribai Phule Pune University
Was this document helpful?
Visit https://errorsea.com/interview-questions/ for more interview questions and answers.
SQL Queries Interview Questions
The given below SQL interview questions requires some data for explanation of SQL queries.
You can refer the following data tables for examples.
Table - StudentDetails
StudId
Name
EnrollmentNo
DateOfJoining
11
Nick Panchal
1234567
01/02/2019
21
Yash Panchal
2468101
15/03/2017
31
Gyan Rathod
3689245
27/05/2018
Table - StudentStipend
StudId
Project
Stipend
11
P1
80000
21
P2
10000
31
P1
120000
Write an SQL query to insert a new student detail in StudentDetails table.
Ans. We can use the INSERT query to insert data into SQL database table.
INSERT INTO StudentDetails(StudId,Name,EnrollmentNo,DateOfJoining)
Values('51','Ashish Patel','2468653','09/03/2019');
Write an SQL query to select a specific student detail in StudentDetails table.
Ans. We can use the SELECT query to select data from the SQL database table.
SELECT * FROM StudentDetails WHERE Studid = '31';
Write an SQL query to update a project detail in StudentStipend table.
Ans. We can use the UPDATE query to update data into the SQL database table.
UPDATE StudentStipend SET Project = 'P3' WHERE Studid = '31';
Write an SQL query to drop a StudentStipend table with its structure.
Ans. We can use the DROP query to drop the SQL database table.
DROP TABLE StudentStipend;