INSERT data into table in PostgreSQL
The PostgreSQL INSERT INTO statement assures you to include a new row in the table. A row or multiple rows can be inserted at the time of the query results.Syntax to use of INSERT INTO keyword in...
View ArticleSelect Query in PostgreSQL
In this tutorial, you will learn how to query basic data using the original PostgreSQL SELECT selection statement.SELECT keywords are most commonly used in PostgreSQL to fetch records from the table,...
View ArticleWhat is an Operator in PostgreSQL
An operator is a reserved symbol or word/letter used to do logical or mathematical operations in the PostgreSQL statement. Types of Operators in PostgreSQL: 1- Arithmetic operators2- Comparison...
View ArticleWHERE Clause in PostgreSQL
WHERE clause used into PostgreSQL statement to specify/apply any condition while retrieving, updating or deleting data from a table.Syntax: PostgreSQL statement using WHERE clauseSELECT <Column...
View ArticleUPDATE in PostgreSQL
Using the UPDATE statement, we can change the value of the existing records in the table. Sometimes we need to change the value of the column(s) as per requirements. Suppose we have the "Employee"...
View ArticleORDER BY clause in PostgreSQL
ORDER BY clause used to sort the result set return from the SELECT statement in ascending or descending order based on the specified criteria. Without using ORDER BY clause, when you query data from...
View ArticleGROUP BY clause in PostgreSQL
With the assistance of some functions, the GROUP BY statement in SQL is used to organize identical data into groups. i.e. if a specific column has the same values in distinct rows, then these rows will...
View ArticleHAVING clause in PostgreSQL
In this article, we will learn about HAVING clause, its proper use on the scenarios based, how to eliminate groups of rows that do not satisfy a specified condition, etc. The HAVING clause used with...
View ArticleLIKE Operator in PostgreSQL
There are three different approaches(SIMILAR TO Regular Expressions, POSIX Regular Expressions, and LIKE) to pattern matching provided by PostgreSQL but the LIKE operator is the best one, it is easy to...
View ArticleLIMIT and OFFSET Clause in PostgreSQL
It can be troublesome to obtain records from a table that contains large amounts of data. Obtaining large amounts of data from a table via a PostgreSQL query can be a reason for poor performance. Using...
View ArticlePostgreSQL- Common Table Expression
Common Table Expression(CTEs) is a handy feature in PostgreSQL, it is a temporary result set that you can reference within another SELECT, INSERT, UPDATE, or DELETE statement. It provides a convenient...
View ArticleConstraints in PostgreSQL
Constraints are some predefined rules applied to columns that are followed to maintain the accuracy and reliability of data. Data Type is self a constraint in PostgreSQL, you can't put string data in...
View ArticleJOINS in PostgreSQL
As per the requirement of the project data, normalization, and table relationships are two factors that come to our mind when creating the database schema, it means we minimize the redundancy from a...
View ArticleUNION and UNION ALL in PostgreSQL
UNION Operator in PostgresThe UNION operator is responsible to combine result sets of two or more than two SELECT statements into a single result set. It also removes all the duplicate row. Syntax of...
View ArticleCUBE sub-clause in PostgreSQL
PostgreSQL CUBE is a sub-clause of the GROUP BY clause which allows us to generate multiple grouping sets.As we know grouping set is a set of columns to which you want to group, but we can not create...
View ArticleROLLUP sub-clause in PostgreSQL
PostgreSQL ROLLUP is a sub-clause of the GROUP BY clause that generates a result set which shows the aggregate for the hierarchy of values in the selected columns. It allows multiple groupings set the...
View ArticlePostgreSQL Identity Column
GENERATED AS IDENTITY Constraint allows you to automatically assign a unique value to a column which introduced as a new feature in PostgreSQL version 10. The GENERATED AS IDENTITY constraint is the...
View ArticleDISTINCT Clause in PostgreSQL
The DISTINCT Clause responsible to remove duplicate rows from the SELECT statement's result set. The DISTINCT Clause keeps one record for each group of duplicates.Syntax of DISTINCT Clause in...
View ArticleMongoDB - count the number of items in an array
Many scenarios come in our programming where we need to calculate the number of the array for a Particular array. To understand the need of the query I am creating a scenario, suppose we have a...
View ArticleRemove/replace special characters from string in PostgreSQL
Sometimes we need to remove special characters from string or columns value. Suppose, we developed an ETL tool that inserting records on a daily basis in the PostgreSQL table from the CSV file. It may...
View Article