Welcome to your SQL Programming MCQ
1.
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?
2.
Which SQL statement is used to create a view?
Which SQL statement is used to create a view?
3.
What is a primary key?
4.
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"?
5.
Which SQL statement is used to return the maximum value?
Which SQL statement is used to return the maximum value?
6.
What is the SQL command to remove duplicates from a result set?
What is the SQL command to remove duplicates from a result set?
7.
Which SQL keyword is used to sort the result-set?
Which SQL keyword is used to sort the result-set?
8.
What is a foreign key?
9.
What does the SQL BETWEEN operator do?
What does the SQL BETWEEN operator do?
10.
Which SQL statement is used to return the minimum value?
Which SQL statement is used to return the minimum value?
11.
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?
12.
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?
13.
What does SQL stand for?
14.
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?
15.
What does the SQL IN operator do?
What does the SQL IN operator do?
16.
Which SQL statement is used to insert new data into a database?
Which SQL statement is used to insert new data into a database?
17.
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?
18.
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"?
19.
Which SQL statement is used to extract data from a database?
Which SQL statement is used to extract data from a database?
20.
What is the SQL command to join two tables?
What is the SQL command to join two tables?
21.
Which SQL statement is used to create a stored procedure?
Which SQL statement is used to create a stored procedure?
22.
What does the SQL LIKE operator do?
What does the SQL LIKE operator do?
23.
How can you rename a column in an SQL table?
How can you rename a column in an SQL table?
24.
What is the correct SQL statement to create a new table?
What is the correct SQL statement to create a new table?
25.
Which SQL statement is used to update data in a database?
Which SQL statement is used to update data in a database?
26.
Which SQL statement is used to delete data from a database?
Which SQL statement is used to delete data from a database?
27.
Which SQL keyword is used to retrieve only unique values?
Which SQL keyword is used to retrieve only unique values?
28.
Which SQL statement is used to delete a table?
Which SQL statement is used to delete a table?
29.
What is the correct syntax to create an index in SQL?
What is the correct syntax to create an index in SQL?
30.
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?