VIEW in PostgreSQL

CREATE VIEW The view is a virtual table in PostgreSQL that does not store any data, since it has no physical existence as such. Syntax: CREATE [TEMP | TEMPORARY] VIEW name AS SELECT column_1, column_2, column_3,…… FROM table WHERE view_conditions; Parameters: name: It is used to specify the name of the PostgreSQL VIEW to be … Read more

BETWEEN condition in PostgreSQL

PostgreSQL BETWEEN To filter the results, the PostgreSQL BETWEEN condition is used with SELECT, INSERT, UPDATE and DELETE statements to get values within a specific range from an expression. Syntax: WHERE expression BETWEEN value1 AND value2; Parameters: expression: It is used to specify the column or field. value1, value2: They are used to specify the … Read more

NOT IN condition in PostgreSQL

PostgreSQL NOT IN To filter the results, the PostgreSQL NOT IN condition is used with SELECT, INSERT, UPDATE and DELETE statements to negate the IN conditions. Syntax: WHERE expressions NOT IN (value1, value2, …. value_n); Parameters: expressions: It is used to specify a column or a field. value_1, value_2… value_n: They are used to specify … Read more

IN condition in PostgreSQL

PostgreSQL IN To filter the results, the PostgreSQL IN condition is used with SELECT, INSERT, UPDATE and DELETE statements to replace the use of multiple OR conditions. Syntax: WHERE expressions IN (value1, value2, …. value_n); Parameters: expressions: It is used to specify a column or a field. value_1, value_2… value_n: They are used to specify … Read more

LIKE condition in PostgreSQL

PostgreSQL LIKE To filter the results, the PostgreSQL LIKE condition is used with a combination of WHERE Clause in SELECT, INSERT, UPDATE and DELETE statements to perform pattern matching. Syntax: WHERE expressions LIKE pattern [ ESCAPE ‘escape_character’ ] Parameters: expressions: It is used to specify a column or a field. pattern: It is used to … Read more

NOT condition in PostgreSQL

PostgreSQL NOT To filter the results, the PostgreSQL NOT condition is used with SELECT, INSERT, UPDATE and DELETE statements to negate a condition. Syntax: NOT condition; Parameters: condition: It is used to specify the conditions to negate. Example: Using NOT with LIKE condition. Students table: ID NAME AGE 1 Joy 5 2 Smiley 13 3 … Read more

AND OR condition in PostgreSQL

PostgreSQL AND OR To filter the results, the PostgreSQL AND and OR conditions can also be used in combination with SELECT, INSERT, UPDATE and DELETE statements to test more than one conditions. Syntax: WHERE condition_1 AND condition_2 .. OR condition_n; Parameters: condition_1, condition_2… condition_n: They are used to specify the conditions to be strictly followed … Read more

OR condition in PostgreSQL

PostgreSQL OR To filter the results, the PostgreSQL OR condition is used with SELECT, INSERT, UPDATE and DELETE statements to satisfy either of the conditions. Syntax: WHERE condition_1 OR condition_2 OR condition_3 …. OR condition_n; Parameters: condition_1, condition_2… condition_n: They are used to specify the conditions to be strictly followed for selection. Example: Students table: … Read more

AND condition in PostgreSQL

PostgreSQL AND To filter the results, the PostgreSQL AND condition is used with SELECT, INSERT, UPDATE and DELETE statements to test more than one conditions. Syntax: WHERE condition_1 AND condition_2 AND condition_3 …. AND condition_n; Parameters: condition_1, condition_2… condition_n: They are used to specify the conditions to be strictly followed for selection. Example: Students table: … Read more

PostgreSQL Conditions

Conditions in PostgreSQL are generally used with CRUD operations to retrieve more specific results. They are usually used with the WHERE clause. Below is the list of conditions facilitated by the PostgreSQL database.   CONDITION USES AND When 2 or more conditions to be met. OR When any one of the conditions are met. AND … Read more