Docsity

SQL BASIC COMMANDS IN DBMS, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download SQL BASIC COMMANDS IN DBMS and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

SQL BASIC COMMANDS

Lec Ayesha Naseer

SELECT

 The SELECT statement in SQL is used to retrieve data from a relational database.

EXAMPLES

DISTINCT

 In SQL, the DISTINCT keyword is used in the SELECT statement to retrieve unique values from a database table. Any value that has a duplicate will only show up once.

EXAMPLES

WHERE CLAUSE

EXAMPLES

EXAMPLES

LIKE

ORDER BY

TOP EXAMPLE

SELECT TOP 2 store_name, Sales, Date FROM Store_Information ORDER BY Sales DESC;SELECT TOP 25 PERCENT store_name, Sales, Date

SQL FUNCTIONS

EXAMPLES

GROUP BY