Menu

SQL Server

What are the Limitations of SQL Server Express Edition ?

Microsoft SQL Server comes in different versions that includes
  • SQL Server Enterprise
  • SQL Server Business Intelligence
  • SQL Server Standard
  • SQL Server Web
  • SQL Server Express
I have been using SQL Server Express 2012 for quite some time . What are the limitations of SQL Server Express compared to the other versions of SQL Server ? In Read More →

How to Export the Query Result to .csv file in SQL Server?

Here's another tip where you could export the query result to .csv file in SQL Server.

How to Export the Query Result to .csv file in SQL Server?

Follow the below steps to export the query result in SQL Server to .csv file. 1. Open SQL Server Management Studio 2. Click the button "New Read More →

How to escape single quote in SQL Server?

Today, when I was trying to insert a value to a table in SQL Server which had single quotes, I ended by getting the following error.

Unclosed quotation mark after the character string
The query looked like this INSERT INTO COUNTRIES (NAME) VALUES ('Test's')

How to escape a single Read More →

How to query the version number and other information related to SQL Server ?

Sometimes, you might want to query the  SQL Server version to know its exact version number and other information like Platform, Product Name etc. Here's a simple stored procedure in SQL Server that helps to retrieve not just the SQL Server version but also additional information about the SQL Server.
/* Read More →           

How to Create a Database Backup in SQL Server using SQL Scripts?

You can create a Database Backup in SQL Server easily by using the SQL Scripts. Just specify the BACKUP DATABASE statement by simply specifying the name of the database to backup and the path where the backup should be created. BACKUP DATABASE <database name> TO BACKUPDEVICE <Path> WITH <Options> The BACKUPDEVICE specifies the Read More →

How to take Database Backup in SQL Server 2008 R2?

It might be important to take the back of the SQL Server database regularly and store them in a secure place which will help you to recover or restore data in case of natural disaster or any other issues. In this blog post, I will demonstrate a step by step process Read More →

Difference between HAVING Clause and WHERE Clause

Below are few differences between HAVING Clause and WHERE Clause

HAVING Clause

  • HAVING Clause is used for aggregating or grouping
  • It is mostly used along with the GROUP BY Clause
  • Can only be used with Select Statement

WHERE Clause 

  • WHERE Clause is used for filtering individual records
  • Can be used with SELECT, UPDATE and DELETE Statement

 

Read More →

Difference between DELETE and TRUNCATE command in SQL Server

Below are few points that differentiate the DELETE and TRUNCATE command.
Sl. No.

Read More →

Difference between Primary Key and Unique Key

By default, primary key creates clustered index on the column and then enforces the uniqueness of the column whereas the unique key, by default creates a non-clustered index. Primary Key
  • By default, creates Clustered index
  • Doesn't allow null
  • Table can have only one Primary Key ( Can include multiple columns together Read More →

Which port number does SQL Server run on?

Which port number does SQL Server run on?

By default, Microsoft SQL Server runs on port 1433. If you want to change the TCP/IP port for SQL Server, you can modify it via SQL Server Configuration Manager -> SQL Native Client Configuration -> Client Protocols -> TCP/IP Properties.

Read More →

Fix for IntelliSense feature in SQL Server Management Studio 2008 R2 may stop working after you install Visual Studio 2010 SP1

Today , i encountered a wiered thing in my SQL Server Management Studio 2008 R2 where the intellisense was somehow not working in SSMS 2008 R2 :( . I had only SQL Server 2008 R2 Express installed on my machine and had recently installed the Microsoft Visual Studio 2010 Service Pack Read More →

Open DBDiff for SQL Server 2008

Last few weeks , i have been playing around with this cool tool called Open DBDiff . As the name suggests Open DBDiff tool lets you compare the database schema for SQL Server 2005 or SQL Server 2008  . Its a simple and effectve tool for database schema comparision . Open DBDiff Read More →

Auto generate change scripts in SQL Server Management Studio

SQL Server Management Studio has a feature that lets you to automatically generate Create or Alter scripts when using the table designer . By deafult , this option is disabled . You can enable it by following the below steps 1. Start SQL Server Management Studio 2. Click Tools -> Options [caption id="attachment_4285" align="aligncenter" Read More →

How to find the SQL Server Version with a query ?

Few days back , i had to find the SQL Server Version on one of the Machine and here's a query that i used or executed in the SQL Server Management Studio to find out the version of the SQL Server .
Select @@version
The @@version will return "Microsoft SQL Server Read More →

How to reset the value of identity Column in SQL Server ?

Here's a way to reset the value of the identity column in SQL Server . The scenario is explained below . For example , when the table "Customers" has a identity column with the initial value of 1 and seed 1 .Each time when you start an App and perform Read More →

Restoring SQL Server 2008 R2 Backup file to SQL Server 2008

Recently i had to restore a SQL Server 2008 R2 Database to a Database in another machine and i ended up getting the message
"The Database was backed up on a server running version 10.50.1600. That version is incompatible with this server, which is running 10.00.1600" .
Then when exploring Read More →

SQL Server 2008 – Change Edit Top 200 Rows and Select Top 1000 Rows to Select/Edit All

Have you noticed the Context Menu , when you right click on the table in the SQL Server Management Studio Express 2008 . The SQL Server Management Studio Express 2005 allows us to “Edit” or “View” the entire records in a table. You might see the Read More →

© 2011-2013 Senthil Kumar's Blog This is my personal blog .The opinions expressed here represent my own and not those of my employer . All Rights Reserved -- Copyright notice by Blog Copyright