Tutorialspoint

#May Motivation Use code MAY10 for extra 10% off

Master SQL interviews(Top interview Questions and answers)

person icon Biswajit NanDA

4.4

Master SQL interviews(Top interview Questions and answers)

Learn Most Common SQL interview questions and answers with detailed explanations and hands on examples

updated on icon Updated on May, 2024

language icon Language - English

person icon Biswajit NanDA

English [CC]

category icon SQL,SQL Server,Development,Database Management

Lectures -81

Duration -2 hours

4.4

price-loader

30-days Money-Back Guarantee

Training 5 or more people ?

Get your team access to 10000+ top Tutorials Point courses anytime, anywhere.

Course Description

This course has been intended for programmers and testers who want to master SQL interview questions and answers.

Most of the modern applications  create data in a backend database and hence knowing SQL is an essential skill for everyone. The course covers a number of questions and answers in the following areas

1) Databases

2) Various types of Database Management system

3) Different types of SQL statements - DDL, DML and DCL statements

4) SQL introduction

5) Creating tables

6) SQL Data types

7) SELECT INTO operations

8) Conditional SELECT operations

9) DELETE ALL and Conditional DELETE operations 

10) DELETE and TRUNCATE operation comparison

11) DROP table operations 

12) Data Integrity and constraints 

13) Column level and Table level primary Keys

14) Creating Unique keys

15) Various types of check constraints

16) Nullable columns

17) Aggregate functions 

18) SQL statements to address different goals 

19) Displaying schema of tables

20) What are JOINS? 

21) Different types of JOINS - Inner Join, Left Outer, Right Outer and Full Outer Joins

22) What is SELF and Cross Joins?

23) Displaying System Date and time 

24) Displaying server and database names 

25) Various string operations - Substring, CHARINDEX, Concatenation etc

26) Creating an empty table from an existing table

27) LEFT, RIGHT operations 

28) What are indexes? 

29) Clustered indexes

30) Non-clustered indexes and difference from Clustered indexes

31) Unique Indexes

and many more ...

Happy learning!

Goals

What will you learn in this course:

  • Revise all important SQL concepts like RDBMS, Joins, indexes and constraints etc. 
  • Learn top SQL interview questions and answers. 
  • Will learn SQL programming questions and answers like top nth salary from tables and ranks.
  • Multiple approaches to tackle the same SQL question.

Prerequisites

What are the prerequisites for this course?

  • Basic SQL Knowledge will be beneficial
Master SQL interviews(Top interview Questions and answers)

Curriculum

Check out the detailed breakdown of what’s inside the course

Common SQL Questions and answers
81 Lectures
  • play icon Goals and Objectives of this course 00:50 00:50
  • play icon Question 1 - What is a database 00:10 00:10
  • play icon Question 2 - What is the difference between a database and DBMS? 00:47 00:47
  • play icon Question 3 - What is the difference between DBMS and RDBMS? 00:32 00:32
  • play icon Question 4 - What is the difference between DDL,DML and DCL commands? 00:52 00:52
  • play icon Question 5 - What is SQL? 00:52 00:52
  • play icon Question 6 - How do you create a table? 01:43 01:43
  • play icon Question 7 - What is the difference between CHAR and VARCHAR2 datatype in sql? 02:21 02:21
  • play icon Q8. How do you create a table from another table? 03:48 03:48
  • play icon Question 9 - How do you insert values into a table? 03:59 03:59
  • play icon Q10. Can you insert data into the same table? 01:13 01:13
  • play icon Question 11 - What will happen if you insert a bigger value into a varchar column?. 01:03 01:03
  • play icon Question 12 - How do you select data from a table? 01:30 01:30
  • play icon Question 13 - How do you select data from a table using WHERE clause? 02:02 02:02
  • play icon Question 14 - How do you delete all data from a table? 00:41 00:41
  • play icon Question 15 - How do you delete data based on a condition? 01:15 01:15
  • play icon Q16. What is the difference between DELETE and TRUNCATE statements? 01:10 01:10
  • play icon Question 17 - How do you drop a table? 01:47 01:47
  • play icon Question 18 - What is the difference between Delete and Drop? 01:34 01:34
  • play icon Question 19 - What are constraints and what is their importance? 01:46 01:46
  • play icon Question 20 - What is a primary key? 01:12 01:12
  • play icon Question 21 - How do you create a Primary key while creating a table? 00:53 00:53
  • play icon Question 22 - How do you create a table level Primary Key? 00:44 00:44
  • play icon Question 23. How do you create a Unique Key while creating a table? 01:11 01:11
  • play icon Question 24 - How do you create a table level Unique Key? 01:29 01:29
  • play icon Question 25 - What is the difference between a Primary Key and Unique Key? 02:30 02:30
  • play icon Question 26 - How do you create a Check constraint while creating a table? 01:53 01:53
  • play icon Question 27 - How do you create a table level check constraint? 02:49 02:49
  • play icon Question 28 - Create a check constraint to restrict values to a range? 01:09 01:09
  • play icon Question 29 - Create a check constraint for the value to start with A 02:06 02:06
  • play icon Question 30 - How do you create a foreign key on a table? 02:44 02:44
  • play icon Question 31 - How do you create a table level foreign key on a table? 01:46 01:46
  • play icon Question 32 - What is meant by a nullable column? 01:00 01:00
  • play icon Question 33 - What are aggregate functions? 00:25 00:25
  • play icon Question 34 - Write a SQL statement to count the total number of rows of a table 00:42 00:42
  • play icon Question 35 - Write a SQL statement to count number of rows matching a condition 00:57 00:57
  • play icon Question 36 - Write a SQL statement where column matches with a string value(LIKE operator) 01:29 01:29
  • play icon Question 37 - How do you calculate the average, minimum and maximum salary from employee table? 00:42 00:42
  • play icon Question 38 - How do you calculate total salary for employees grouped by employee ID? 01:18 01:18
  • play icon Question 39 - How do you select data in a table in sorted order(Ascending and descending)? 01:16 01:16
  • play icon Question 40 - How do you specify a condition with a GROUP BY clause? 02:03 02:03
  • play icon Question 41 - Can you have both HAVING and WHERE clauses in the same SELECT statement? 01:06 01:06
  • play icon Question 42 - Write a query to display schema of a table 01:43 01:43
  • play icon Question 43 - Alter a table to add a new column to a table 00:56 00:56
  • play icon Question 44. Alter a table to modify a column 01:18 01:18
  • play icon Q45 - Alter a table to drop a column of a table 00:54 00:54
  • play icon Question 46 - What is a JOIN? 01:10 01:10
  • play icon Question 47. Explain different types of joins 00:49 00:49
  • play icon Question 48 - What is the difference between an outer join and inner join? 02:36 02:36
  • play icon Question 49 - What is the difference between Left Inner Join and Left Outer join? 01:28 01:28
  • play icon Question 50 - What is cross join? Where can it be used? 02:40 02:40
  • play icon Question 51 - What is full join? 01:40 01:40
  • play icon Question 52 - What is self join? 02:40 02:40
  • play icon Question 53 - Write a sql statement to display current date and time 00:30 00:30
  • play icon Question 54 - Write a sql statement to display the server and database name 00:35 00:35
  • play icon Question 55 - Write a sql statement to display the user name 00:27 00:27
  • play icon Question 56 - Write a sql statement to display the number of tables present in a database 01:50 01:50
  • play icon Question 57 - Write a sql statement to display the second highest salary from a table 02:02 02:02
  • play icon Question 58 - Write a SQL query to return a substring from a string 01:36 01:36
  • play icon Question 59 - Write a SQL query to return the no of characters of a given string 00:41 00:41
  • play icon Question 60 - Write a sql query to return the numeric position of a character in a string 01:05 01:05
  • play icon Question 61 - Write a SQL statement to display distinct salaries from a table 00:54 00:54
  • play icon Question 62 - How do you concatenate two strings in sql? 01:08 01:08
  • play icon Question 63 - How can you create a empty table with the same structure as another table? 01:20 01:20
  • play icon Question 64 - How can you return first 3 characters(right and middle also) of a string? 01:37 01:37
  • play icon Question 65 - What are indexes? Why they are used? 01:59 01:59
  • play icon Question 66 - What are clustered indexes? 02:28 02:28
  • play icon Question 67 - What is a non-clustered index? 02:28 02:28
  • play icon Question 68 - What is a Unique index? Write a sql to create one 02:29 02:29
  • play icon Question 69 - What is a view? Write a sql statement to create a view 01:43 01:43
  • play icon Question 70 - Write a sql statement to display the number of views present in a database 01:39 01:39
  • play icon Question 71 - What is a sub-query? 02:12 02:12
  • play icon Question 72 - Write a query to remove spaces present in a string from sides 01:34 01:34
  • play icon Question 73 - Difference between Union and Union all operators 02:04 02:04
  • play icon Q74. What is EXCEPT or MINUS operator? 01:49 01:49
  • play icon Question 75 - What is intersect operator? 00:55 00:55
  • play icon Question 76 - What is temp table in sql? 01:06 01:06
  • play icon Question 77 - What are global temp tables? 01:13 01:13
  • play icon Question 78 - How to get nth highest salary? 03:13 03:13
  • play icon Question 79 - How to get nth highest salary when there are duplicates? 04:22 04:22
  • play icon Question 80 - What is coalesce function? 01:36 01:36

Instructor Details

user profile image

Biswajit NanDA

e


Course Certificate

Use your certificate to make a career change or to advance in your current career.

sample Tutorialspoint certificate

Our students work
with the Best

Related Video Courses

View More

Annual Membership

Become a valued member of Tutorials Point and enjoy unlimited access to our vast library of top-rated Video Courses

Subscribe now
Annual Membership

Online Certifications

Master prominent technologies at full length and become a valued certified professional.

Explore Now
Online Certifications

Talk to us

1800-202-0515