Select data from Table in Database
The Select Statement is used to retrieve the selected data from table in database. The select query in the database retrieve selected data , match with column name specified by you. The Syntax used in simple select statement is given below
select column name from table;
The select query retrieve the record value of specified column in the syntax from table.
select * from table;
The select query retrieve all the column present in the specified table.
The Keyword from indicates the table, from where the data is retrieve.
Understand with Example
The Tutorial illustrates an example, how to retrieve the data from table. In this Tutorial we create a table country. The syntax used to retrieve the record from database are as :
The insert statement is used to insert the record into a table country.
The select statement is used to retrieve the record from table.
|insert into country (countryname) values('Norway');
insert into country (countryname,countrycapital) values('Norway','Oslo');
select * from country;