SQL Server Course for Beginners with 100+ examples - PRIMARY KEY Constraint

SQL Server Course for Beginners with 100+ examples - PRIMARY KEY Constraint

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

This video tutorial explains how to use the SELECT TOP clause in SQL to limit the number of records returned from a query. It covers fetching a specific number of top records, using percentages to retrieve a portion of records, and combining the SELECT TOP clause with the WHERE clause to apply conditions. Examples are provided using an Employee table to demonstrate these concepts.

Read more

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'SELECT TOP' clause in SQL?

To delete the top records from a table

To insert new records at the top of a table

To fetch a specific number of top records from a table

To update the top records in a table

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you fetch 50% of records from a table using SQL?

SELECT TOP 50 PERCENT FROM table_name

SELECT 50% FROM table_name

SELECT TOP 50% FROM table_name

SELECT TOP 50 FROM table_name

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a table has 6 rows, how many rows will be fetched using 'SELECT TOP 75%'?

5 rows

3 rows

4 rows

6 rows

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if you use a 'WHERE' clause with 'SELECT TOP' to filter records?

It fetches all records regardless of the condition

It fetches the top records and ignores the condition

It deletes the records that meet the condition

It fetches only the top records that meet the condition

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which SQL clause would you use to fetch records with a salary greater than 7000?

SELECT TOP WHERE salary > 7000

SELECT TOP 50% WHERE salary > 7000

SELECT WHERE salary > 7000

SELECT TOP 2 WHERE salary > 7000