1. What does the SQL ORDER BY clause do?
Explanation: The ORDER BY clause is used to sort the query results based on one or more columns.
Report for correction2. Which SQL statement is used to change data in an existing table?
Explanation: The UPDATE statement is used to change data in an existing table.
Report for correction3. Which SQL statement is used to add a new column to an existing table?
Explanation: The ALTER TABLE statement is used to add a new column to an existing table.
Report for correction4. Which SQL statement is used to add a primary key to an existing table?
Explanation: The ADD PRIMARY KEY statement is used to add a primary key to an existing table.
Report for correction5. What does DML stand for in SQL?
Explanation: DML stands for Data Manipulation Language, which is used to manipulate data stored in a database.
Report for correction6. Which SQL statement is used to remove a table from a database?
Explanation: The DROP TABLE statement is used to remove a table from a database.
Report for correction7. Which SQL statement is used to retrieve unique values from a column?
Explanation: The DISTINCT keyword is used to retrieve unique values from a column in a SELECT query.
Report for correction8. Which SQL statement is used to delete all records from a table without deleting the table structure?
Explanation: The TRUNCATE TABLE statement is used to delete all records from a table without deleting the table structure.
Report for correction9. Which SQL statement is used to retrieve data from a database?
Explanation: The SELECT statement is used to retrieve data from a database.
Report for correction10. Which SQL statement is used to update existing records in a database?
Explanation: The UPDATE statement is used to update existing records in a database.
Report for correction11. Which SQL statement is used to insert new records into a table?
Explanation: The INSERT statement is used to insert new records into a table in a database.
Report for correction12. Which SQL statement is used to join two or more tables based on a related column?
Explanation: The JOIN statement is used to combine data from two or more tables based on a related column.
Report for correction13. Which SQL statement is used to create a new table?
Explanation: The CREATE TABLE statement is used to create a new table in a database.
Report for correction14. What does the SQL DISTINCT keyword do?
Explanation: The DISTINCT keyword is used to retrieve unique values from a column in a SELECT query.
Report for correction15. What is the result of the following SQL query SELECT COUNT(*) FROM Customers;?
Explanation: The COUNT(*) function counts the total number of records in the Customers table.
Report for correction16. What is the purpose of the SQL MIN() function?
Explanation: The MIN() function is used to find the minimum value of a numeric column in a database table.
Report for correction17. What is the purpose of the SQL COUNT() function?
Explanation: The COUNT() function is used to count the number of records in a result set.
Report for correction18. What is the purpose of the SQL DELETE statement?
Explanation: The DELETE statement is used to remove records from a table in a database.
Report for correction19. What is the purpose of the SQL GROUP BY clause?
Explanation: The GROUP BY clause is used to group rows into sets based on specified columns.
Report for correction20. What is the purpose of the SQL HAVING clause?
Explanation: The HAVING clause is used to filter grouped rows based on specified conditions.
Report for correction21. What is the purpose of the SQL SUM() function?
Explanation: The SUM() function is used to calculate the total sum of a numeric column.
Report for correction22. What is the purpose of the SQL AVG() function?
Explanation: The AVG() function is used to calculate the average value of a numeric column.
Report for correction23. What is the purpose of the SQL MAX() function?
Explanation: The MAX() function is used to calculate the maximum value of a numeric column.
Report for correction24. What is the purpose of the SQL WHERE clause?
Explanation: The WHERE clause is used to filter rows in the result set based on a specified condition.
Report for correction