Altering existing tables with data to system-versioned temporal table
Here are the simple steps with example for altering existing version tables with data to system-versioned temporal table.
Here are the simple steps with example for altering existing version tables with data to system-versioned temporal table.
Using simple sql technique, here we will see how to get the list of temporal tables in a database.
How to check and drop a system-versioned temporal table if it exists in the database as temporal tables are different from regular tables?
Here a simple trick to find the name of the history table of a system versioned temporal table using SQL select statement.
Let us see how to check if a specific table is system versioned temporal or not using SQL script. SQL tips to check if temporal table exists.
With example how to get only the common records from two tables using INTERSECT and the advantages of INTERSECT over INNER JOIN.
Getting records from one table which are not present in another table using EXCEPT operator in SQL Server.
In SQL Server there are several ways to concatenate columns to a single string. Here are few methods for concatenating columns based on the version of SQL Server.
Formatting SQL statements or source code of procedures or function in SSMS is a daunting task. Here you will see how to use a plugin to format T-SQL in SSMS.
Here is a simple tip on how to drop a temporary or temp table if it exists using the DIY in 2016 or higher versions of SQL Server.
Here is a simple tip to reset identity seed of an auto incremented identity column after deleting records from the table in SQL Server.
Here is a simple tip to convert the datetime value to a specific formatted date like YYYY-MM-DD in SQL Server 2012 and higher.
Here is a simple method to generate a date from integer format of day, month and year in SQL Server.
Here we will compare the builtin SQL Server functions RAND() vs NEWID() and understand the major differences between them.
Here is a simple trick for generating unique random number for each row in select statement in SQL Server. Let’s see how it works.
Generating random numbers is very simple in SQL Server. We can use the built-in function RAND() to generate random number. Here are some examples.
There are several ways to get the the list of column names of a table on a specific SQL Server database. I will go through these methods.
There is a couple of straightforward ways to get day of year for a given date in SQL Server using DATENAME or DATEPART built-in function. Let’s see how to use them
Here is the simple technique to get only the date part of GetDate() in SQL Server.
Here are couple methods to find the number of weeks in a month including the partial weeks considering different start day of week.