0 votes
in MariaDB by
What is the use of WHERE clause?

1 Answer

0 votes
by
The WHERE clause is used to select or change a specific location to fetch the records from a table. It is used with SELECT, INSERT, UPDATE and DELETE statement.

Syntax:

[COMMAND] field,field2,... FROM table_name,table_name2,... WHERE [CONDITION]         

WHERE Clause with Single Condition

Example

We have a table "Students" having some data. Let's retrieve all records from the "Student" table where student_id is less than 6.

SELECT *     

FROM Students    

WHERE student_id < 6;     

Output:

Mariadb Where clause 1
...