Quantcast
Channel: sql server – Jean Paul’s Blog
Browsing latest articles
Browse All 9 View Live

Image may be NSFW.
Clik here to view.

Using xml column in sql server with XSD enabled

For a long time I was wondering about why the xml type is needed in sql server.  Following are a few number of advantages on using xml column types which I found implemented in industry. We can store...

View Article



Image may be NSFW.
Clik here to view.

The system tables in Sql Server

We can use the sys.tables and sys.objects to find metadata of tables and columns. Display all User Tables select * from sys.tables – displays all user tables Display all Columns in a Table select *...

View Article

Image may be NSFW.
Clik here to view.

Sql Server :: Cool Sqls

Some useful sqls I am sharing here. Description Sql Get Row Number of any table SELECT ROW_NUMBER() OVER (ORDER BY Name ASC) AS ROWID, * FROM TableX Delete Duplicate Records WITH CTE (Col1,Col2,...

View Article

Image may be NSFW.
Clik here to view.

How to create Linked Server in Sql Server?

Open the Management Studio and in the Server Objects > Linked Servers, right click select New Linked Server menu. In the appearing screen enter the actual remoteserver alias name as “RS” Enter...

View Article

Image may be NSFW.
Clik here to view.

Automatic History using Triggers

I would like to take a moment to explain the following problem I am facing: I do have a table named Equity which contains the company name and the current PE Ratio.  The PE Ratio will be updated daily...

View Article


Image may be NSFW.
Clik here to view.

How to shrink Sql Server Database?

The Enterprise Management studio provides an option to shrink the database.   Step 1: Open Enterprise Management Studio (i am using sql server 2008) and select database, right click and choose...

View Article

Image may be NSFW.
Clik here to view.

Sql Server – Transact Sql to make a column unique

ALTER TABLE TableName ADD CONSTRAINT NewConstraintName UNIQUE(ColumnName)

View Article

Image may be NSFW.
Clik here to view.

SQL Server–Create User / Domain User using SQL

CREATE LOGIN user1WITH PASSWORD = ’MyPassword’ USE TheDbName CREATE USER user1FOR LOGIN user1; GO CREATE LOGIN [Domain\user1] FROM WINDOWS; USE TheDbName CREATE USER user1 FOR LOGIN [Domain\user1]

View Article


Image may be NSFW.
Clik here to view.

What is AlwaysOn in SQL Server?

SQL Server 2012 introduced the new feature called AlwaysOn. AlwaysOn provides High Availability & Disaster Recovery alternative to Database Mirroring. What is Database Mirroring? Database Mirroring...

View Article

Browsing latest articles
Browse All 9 View Live


Latest Images