MySql Select Query

To select all records from a table we use following query


To select all row of student we use

It will show following result

To select perticular column from table we use

If we want to select id and name of student the we will write

ther is no limit we can select one to all column by specifying the column name.
We can also select table detail based on some criteria for that we use following query

We want to fetch all record of student whose id is 1.
for that we write

If you want to fetch detail of student whose age is 10
for that we will use

where can also set multiple condition with where clause

Selecting column with null value we write following query

To check for null value we use is null with field name.

Leave a Comment