SQL Server SELECT

SQL Server select is used to retrieve the rows from database We can call this as query.

Syntax:

SELECT coulmn_list
[ FROM table_name ]
[ WHERE condition ]
[ GROUP BY groupby_expression ]
[ HAVING condition ]
[ ORDER BY ASC | DESC ]

Examples:
Examples are based on following table
SQL-Server-Insert1

Display all employees information
select * from emp

Display employees information whose salary is more than 7000.
select * from emp
where salary > 7000

Display employees whose department number is 30
select * from emp
where depno=30

Display the employees whose names start with k
select * from emp
where empname like ‘k%’

Powered by k2schools