Tutorialspoint

Master SQL interviews(Top interview Questions and answers)

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

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

  • 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

  • Basic SQL Knowledge will be beneficial
Show More

Curriculum

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

    Feedbacks (1)

  • sarang doliya
    sarang doliya

Master SQL interviews(Top interview Questions and answers)
This Course Includes
  • 2 hours
  • 81 Lectures
  • Completion Certificate Sample Certificate
  • Lifetime Access Yes
  • Language English
  • 30-Days Money Back Guarantee

Sample Certificate

sample certificate

Use your certification to make a career change or to advance in your current career. Salaries are among the highest in the world.

We have 30 Million registered users and counting who have advanced their careers with us.

X

Sample Certificate

Talk to us

1800-202-0515