PostgreSQL And – Or AND returns query rows if both conditions are true. OR returns query rows if at least one of the conditions is true. And – Or syntax SELECT * FROM table_name WHERE condition AND condition; SELECT * FROM...
PostgreSQL Where The PostgreSQL WHERE clause is used to return records that meet the conditions in a select. Where syntax -- select the records that meet the condition SELECT * FROM table_name WHERE {condition} SELECT * FROM view_name WHERE {condition} SELECT...
PostgreSQL Distinct The PostgreSQL DISTINCT is used to eliminate duplicate records from a table or a query. Distinct syntax -- select distinct column records from table SELECT DISTINCT column_name FROM table_name -- select specific columns SELECT DISTINCT column_name1, column_name2 FROM table_name...
PostgreSQL Delete The PostgreSQL DELETE statement is used to delete records from a table. Delete syntax --deletes the records that meet the conditions DELETE FROM table_name WHERE {conditions} -- delete all records from table DELETE FROM table_name Delete example DELETE FROM...
PostgreSQL Update The PostgreSQL UPDATE statement is used to modify values in a table. Update syntax UPDATE table_name SET column_n1 = new_value1, column_n2 = new_value2, column_n3 = new_value3, ... WHERE {condition} Update example UPDATE goods SET description = 'Car 2 description'...