-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lecture2.txt
24 lines (20 loc) · 1.18 KB
/
Lecture2.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Lecture-2:
Select Statement in SQL || Select Statement With 3 Different Ways:
Select: Select is an SQL command that used to select data from database/table.
Example: Amazon => DB => Work
Table => Customer => Number, Name, Email, Contact Number…
Syntax: select *(or use “column_name”) from table_name;
(statement) (entire database) (key) (given table)
Command: select email from customer;
select email, name from customer;
Distinct: It is used to retrieve unique values from a specified column or set of columns in a database table. It eliminates duplicate records, ensuring that only distinct, non-repeated values are returned.
Table => Student
Sl. No. Name Course
1. Rup ECE
2. Rup Web Development
3. Rupayan ECE
4. Rupayan Cloud Computing
Command: select distinct Name from Student;
Output: Rup => ECE => Web Development
Rupayan => ECE => Cloud Computing
-------×-------