21.6 C
New York

MySQL WHERE Clause

Published:

MySql WHERE is a command seen as a clause used to sometimes complete other mysql command statements.

Example:

SELECT * FROM paymentmethod
WHERE paypal = 'Yes';

3 mysql query command statements that uses WHERE clause:

  •  UPDATE
  •  SELECT
  •  DELETE

The above listed statements constantly uses WHERE clause to identify the specifications of records query command statements is to be executed on.

How the WHERE clause works

WHERE is use to specifies condition on which the group of records or a record which are been given query to execute .

see the example above as we use where in MySql Select statement

the syntax

SELECT column1, column2, ...
FROM table_name
WHERE condition;

from our example you will notice that when executed the only record that will be selected from the database table (paymentmethod) are the columns (paypal) which it record contains yes.

Godwin
Godwinhttps://shopinson.com
Owner and founder of shopinson.com. He is a passionate programmer with enthusiasm in daily discovering of solving logic with new block of codes. He loves creating contents and blogging his new discoveries on programming language and related peripherals.

Related articles

spot_img

Recent articles

spot_img