SELECT Query in mysql

table1

id name mobile no dob
       
     



1.   ” SELECT *  FROM table1 ”  ;


2. ” SELECT *  FROM table1 WHERE  id= ‘1’   ORDER BY  id  DESC ”  ;


3. ” SELECT *  FROM table1 WHERE  dob BETWEEN  date1 AND  date2  ”  ;

4. ” SELECT *  FROM table1 WHERE id=’1′  AND  dob BETWEEN  date1 AND  date2  ”  ;

5.  ” SELECT *  FROM table1 WHERE  id= ‘1’  LIMIT  10″  ;

6.  ” SELECT *  FROM table1 WHERE  id= ‘1’  LIMIT   0  , 10 ”  ;

7.   ” SELECT *  FROM table1 WHERE  name LIKE  ‘%name%’ ”  ;

8.  ” SELECT *  FROM table1 WHERE  name LIKE  ‘%name%’  ORDER BY  id  ASC  LIMIT 10 ”  ;

9.   group by

10  . having 

11  or

12  not

13  as 

14   

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s