Written By:- Isha Malhotra (Software Developer)
Email:-malhotra.isha3388@gmail.com.
Note: -if you find this article helpful then kindly leave your comment
Select
command in sql is used to retrieve the data from tables. In this Article we
will only discuss how to use the select statement.
See
the following table which will be used in the select statement:
Emp_no
|
Emp_fname
|
Emp_lname
|
Dept_no
|
salary
|
101
|
Isha
|
Malhotra
|
D-101
|
10000
|
102
|
Vishu
|
Malhotra
|
D-102
|
190000
|
Ø Select all data
When you want to retrieve all data (without filtration and
specification) from any table then we use following syntax:-
select * from
employee;
Note: - * means all and employee is table
name
Ø Select Specific Column from table
When you want to select the data of specific column
select emp_no, emp_fname from employee;
Note: - in this query emp_no and emp_fname is
column name. there can be N number of
Column
In this article we only discussed how to use
the select statement.
No comments:
Post a Comment