SQL Server Trigger After Insert

sql server trigger after insert example

We can fire triggers after an SQL statement to perform a specific task. A trigger is a set of SQL statements defined to perform a specific task you can fire after a certain event. This tutorial will discuss SQL Server trigger after insert with a few examples. The triggers can be created on the tables. … Read more >>

SQL Server check user permissions on database

How to check user permissions in SQL Server management studio

Do you want to check user permissions in SQL Server? In this SQL server tutorial, I will explain to you how to check user permissions on a database in SQL Server. I will also explain, how to check user permissions in sql server management studio, sql query to check user permissions on the database, and … Read more >>

PostgreSQL Compute Total Sum of Column

PostgreSQL Compute Total Sum of Column with GROUP BY

In this PostgreSQL tutorial, I will show you how to compute the total sum of columns in PostgreSQL. You will understand the function SUM() in this tutorial to compute the sum of all the values in a column. Also, I will explain to you the syntax of the SUM() function and how to use it. … Read more >>

PostgreSQL To_Char Date Format

Using PostgreSQL To_Char to Format Date in Table

In this PostgreSQL tutorial, I will show you how to use PostgreSQL TO_CHAR format date, which means you will understand how to use the TO_CHAR() function to format date in a meaningful way. I will also explain to you the importance of the PostgreSQL TO_CHAR() function and how it can be helpful in presenting the … Read more >>

Postgres Timestamp Comparison

Postgres Timestamp Comparison Using Greater Than Operator

In this PostgreSQL tutorial, I will show you the Postgres timestamp comparison to compare the timestamp value. I will explain to you “What is timestamp?” and also some operators and functions that you can use to compare timestamp values. Additionally, you will learn how to compare timestamps using different real-world examples with different operators and … Read more >>

Row_number in PostgreSQL

Ranking Rows Using Row_number in PostgreSQL

In this PostgreSQL tutorial, I will show you how to use row_number in PostgreSQL to assign a unique sequential integer as a rank to each row. I will also tell you the importance of the Row_number() function with syntax and examples. Additionally, you will understand how to implement Row_number() for ranking and pagination with the … Read more >>

How to Create Index If Not Exist in PostgreSQL

How to Create Index If Not Exist in PostgreSQL

In this PostgreSQL tutorial, I will show how to create index if not exist in PostgreSQL. You will learn about the syntax of creating an index and also you will learn how to create an index without using the IF NOT EXISTS clause. Then you will understand how to create an index using IF NOT … Read more >>

PL/pgSQL Block Structure in PostgreSQL

Block Structure in PostgreSQL Verifying User

In this PostgreSQL tutorial, I will show you how to implement PL/pgSQL block structure in PostgreSQL. The PL/pgSQL block structure acts as a prototype and is used when creating a function or procedure in PostgreSQL. Also, you will understand “What is anonymous code block” and the concept of subblocks. Additionally, you will understand how to … Read more >>

How to Return Record using PostgreSQL Function

Returning Record using PostgreSQL Function

In this PostgreSQL tutorial, I will show you how to return a record using the PostgreSQL function. You will understand the syntax of the function and also you will create one simple function to understand how you can define your own function with different parameters. Additionally, I will show how you can implement the function … Read more >>

PostgreSQL Add Foreign Key If Not Exist

PostgreSQL Add Foreign Key If Not Exist Registrations to Courses

In this PostgreSQL tutorial, how to add a foreign key if not exist in PostgreSQL, where you will understand why you need to add the foreign key to tables. Also, you will use the PL\PGSQL with table pg_constraint to check whether the existing table has a foreign key or not. I will also explain to … Read more >>