MSSQL-Part6: What is SELECT TOP Clause? DISTINCT Statement in sql?

#sql #learnsql #mssql
▬▬▬▬▬▬ In this Video ▶️ ▬▬▬▬▬▬
The SELECT TOP clause is used to specify the number of records to return. The SELECT TOP clause is useful on large tables with thousands of records. Returning a large number of records can impact performance.
Syntax: SELECT TOP number * column_name(s)
FROM table_name
WHERE condition;

The SELECT DISTINCT statement is used to return only distinct (different) values. Inside a table, a column often contains many duplicate values; and sometimes you only want to list the different (distinct) values.
Syntax: SELECT DISTINCT column1, column2, …
FROM table_name;

The BETWEEN operator selects values within a given range. The values can be numbers, text, or dates. The BETWEEN operator is inclusive: begin and end values are included.
Syntax: SELECT column_name(s)
FROM table_name
WHERE column_name BETWEEN value1 AND value2;

▬▬▬▬▬▬ Useful Links 🛠 ▬▬▬▬▬▬
Blog ►​​​
GitHub Repo ►​​

▬▬▬▬▬▬ Connect with us 👋 ▬▬▬▬▬▬
~~~Subscribe to this channel, and press bell icon to get all updated videos on Selenium and Cypress Automation:

~~~ Follow us on Facebook & Twitter to get more updates: