SqlServer

Drop system-versioned temporal table in SQL Server

Posted on Updated on

To Drop a Temporal Table you first need to turn System_Versioning OFF. Then Delete your required temporal table. Finally you can also choose to delete History table associated with your Temporal Table.

CODE EXAMPLE:
ALTER TABLE [dbo].[TemporalTest] SET ( SYSTEM_VERSIONING = OFF  )
GO
DROP TABLE [dbo].[TemporalTest]
GO
DROP TABLE [dbo].[TemporalTestHistory]
GO

Installing SQL Server on Linux (Ubuntu 18.04)

Posted on Updated on

Installation of SQL Server on Linux (in Ubuntu) is a few steps process. We will first update and upgrade our OS then we will start our installation process.
Read the rest of this entry »

Database ‘Adventureworks’ does not exist (Msg 911)

Posted on Updated on

If you get this sort of error as shown below:

Msg 911, Level 16, State 1, Line 1
Database 'Advantureworks ' does not exist. Make sure that the name is entered correctly.

And you already have this database, make sure you are typing the Database name correctly such as:

USE Adventureworks

Computed Columns – SQL Server

Posted on Updated on

Computed columns it self does not contain any data, but shows value based on expression (given formula). Its very simple to add a computed columns in SQL Server you can either add them through DDL query or through SSMS Read the rest of this entry »

Find version of SQLSERVER

Posted on Updated on

We often want to know about the version we are using. There are few simple ways to get the version you are on.

1. Simplest way: Read the rest of this entry »

Difference Between ROWVERSION and TimeStamp – SQLSERVER

Posted on Updated on

No difference! rowversion is new name for timestamp or we can say a synonym for timestamp datatype.  Actually, the “Timestamp” datatype was defined as a counter of database row updates. Later, the ISO defined the “Timestamp” datatype as date and time information, causing a conflict between the SQL standards definition and the specific usage by MS SQL-Server. So Microsoft replaced the name “timestamp” by a new name “rowversion” Read the rest of this entry »