Share
, , ,

MySQL: The WHERE Statement



  • Select a row from a specific column by giving a condition-
    SELECT name, address FROM customers WHERE id=54
  • Select all the row accept a specific row from a column-
    SELECT name, address FROM customers WHERE id !=54
  • Select rows by implementing different condition-
    SELECT name, address FROM customers WHERE id <54
  • Select  rows between two specific rows by using statement BETWEEN-
    SELECT name, state FROM customers WHERE id BETWEEN 20 AND 30
      



Notice:

  1. Use WHERE statement when will got select a specific row from a column.
  2. If you want to select all rows accept a specific row then use != sign.
  3. You can use different conditional sign like <,  =<, >, =>, = according to your query.
  4. If you want to find data between two conditions then then use the statement BETWEEN and use the statement AND between the two conditions. 

                                               

0 comments:

Post a Comment