Online Test

1). Which SQL command is used to remove all records from a table without removing the table itself??

2). What is the function of the `EXISTS` operator in SQL??

3). Which SQL statement is used to combine the results of two or more SELECT statements??

4). What is the purpose of the `PARTITION BY` clause in SQL??

5). Which SQL clause is used to define a condition for a specific group of records after an aggregation operation??

6). What does the `ROW_NUMBER()` function do in SQL??

7). How can you update specific rows in a SQL table based on a condition??

8). Which of the following SQL statements will create an index on a table??

9). What is the use of the `CROSS APPLY` operator in SQL Server??

10). How can you ensure that a column in a SQL table can have only a single NULL value??

11). Which SQL function is used to get the number of rows in a table??

12). What is a common use of the `WITH (NOLOCK)` hint in SQL queries??

13). Which SQL clause is used to limit the number of rows returned by a query??

14). What is the purpose of the `TRUNCATE` command in SQL??

15). How do you create a view in SQL??

16). Which SQL function is used to calculate the average value of a numeric column??

17). What is a `self-join` in SQL??

18). How do you add a new column to an existing SQL table??

19). What does the `UNION ALL` operator do in SQL??

20). Which SQL clause is used to sort the results of a query??

21). What is the function of the `GROUP_CONCAT()` function in SQL??

22). What is an `INNER JOIN` in SQL??

23). How can you ensure that a column in a SQL table only accepts unique values??

24). What is a `stored procedure` in SQL??

25). How do you remove a column from a table in SQL??

26). What does the `RANK()` function do in SQL??

27). What is a `trigger` in SQL??

28). Which SQL statement is used to prevent SQL injection attacks??

29). What is the purpose of the `HAVING` clause in SQL??

30). How can you find duplicate rows in a SQL table??

31). What is the purpose of the `FOREIGN KEY` constraint in SQL??

32). What does the `LEAD()` function do in SQL??

33). How do you create a temporary table in SQL??

34). What is a `common table expression (CTE)` in SQL??

Test Results