Welcome to your SQL Programming MCQ
1.
Which SQL statement is used to delete data from a database?
Which SQL statement is used to delete data from a database?
2.
How can you rename a column in an SQL table?
How can you rename a column in an SQL table?
3.
How do you select all the records from a table named "Employees" where the "LastName" is "Smith"?
How do you select all the records from a table named "Employees" where the "LastName" is "Smith"?
4.
Which SQL keyword is used to sort the result-set?
Which SQL keyword is used to sort the result-set?
5.
Which SQL function is used to count the number of rows in a table?
Which SQL function is used to count the number of rows in a table?
6.
What does the SQL IN operator do?
What does the SQL IN operator do?
7.
Which SQL statement is used to update data in a database?
Which SQL statement is used to update data in a database?
8.
What is a foreign key?
9.
Which SQL keyword is used to fetch the first 5 records from a table?
Which SQL keyword is used to fetch the first 5 records from a table?
10.
Which SQL keyword is used to add a new column to a table?
Which SQL keyword is used to add a new column to a table?
11.
What is the correct syntax to create an index in SQL?
What is the correct syntax to create an index in SQL?
12.
What is the correct SQL statement to create a new table?
What is the correct SQL statement to create a new table?
13.
Which SQL statement is used to insert new data into a database?
Which SQL statement is used to insert new data into a database?
14.
Which SQL keyword is used to retrieve only unique values?
Which SQL keyword is used to retrieve only unique values?
15.
What is the SQL command to remove duplicates from a result set?
What is the SQL command to remove duplicates from a result set?
16.
What is a primary key?
17.
Which SQL statement is used to create a stored procedure?
Which SQL statement is used to create a stored procedure?
18.
What does the SQL BETWEEN operator do?
What does the SQL BETWEEN operator do?
19.
Which SQL statement is used to create a view?
Which SQL statement is used to create a view?
20.
What does the SQL LIKE operator do?
What does the SQL LIKE operator do?
21.
Which SQL statement is used to extract data from a database?
Which SQL statement is used to extract data from a database?
22.
Which SQL statement is used to combine the results of two or more SELECT statements?
Which SQL statement is used to combine the results of two or more SELECT statements?
23.
Which SQL function is used to find the total sum of a numeric column?
Which SQL function is used to find the total sum of a numeric column?
24.
What is the SQL command to join two tables?
What is the SQL command to join two tables?
25.
What does SQL stand for?
26.
Which SQL clause is used to filter the results returned by a query?
Which SQL clause is used to filter the results returned by a query?
27.
Which SQL statement is used to return the minimum value?
Which SQL statement is used to return the minimum value?
28.
How do you return the number of unique values in the "Country" column in a table named "Customers"?
How do you return the number of unique values in the "Country" column in a table named "Customers"?
29.
Which SQL statement is used to return the maximum value?
Which SQL statement is used to return the maximum value?
30.
Which SQL statement is used to delete a table?
Which SQL statement is used to delete a table?