91-9990449935 0120-4256464 |
PostgreSQL WHERE ClauseThe WHERE clause specifies a condition while you fetch data from a table or a join of multiple tables. It is generally used with SELECT, UPDATE and DELETE statements to filter the results. It returns the specific result only when the condition is satisfied. WHERE Clause with SELECT statementSyntax: Note: WHERE condition can be used with logical operators such as >, <, =, LIKE, NOT, OR, AND etc. Example1. WHERE clause with single condition:Let's take a table "EMPLOYEES" having the following data. Execute the following query to return a single record: Output: Example2: WHERE clause with multiple conditionsWe are using the same table "EMPLOYEES" for this example also. Execute the following query: Output:
Next TopicPostgreSQL ORDER BY clause
|