Select Query in SQL
Select query is used to retrieve the database from RDBMS databases. RDBMS stores data in form of tables.
Rows and column format. You have selection the data from table with where clause which will return specific data according to condition present in where clause. For projection the data you have to specify the column name instead of * mark in select query to get specific column of data.
--Select all data from table
select * from table_name;
-- Select selection data
select * from table_name where column_name=value;
--select projection data
select col_name1,col_name2 from table_name;
--For both selection and projection
select col_name1,col_name2 from table_name where col_name3 = value;
Select all columns from the employee table which employee id has value 101.
Select * from employee where employee_id = 101;