|
|
-
|
|
The old DATABASEPROPERTY function has been marked as deprecated starting SQL Server 2005. The replacement is the DATABASEPROPERTYEX which provides greater flexibility and exposes many more database properties to the user....
|
|
-
|
|
A lot of content is available on the Internet describing the new features introduced in SQL Server 2012. However, if you are attempting to certify your database against SQL Server 2012, this series will help you to know about the deprecated (i.e. removed) features of SQL Server 2012 and their corresponding replacements, if any. Today, we discuss the deprecation of the WITH [MEDIA]PASSWORD option duing database/log backups & restores....
|
|
-
|
|
Run the following code
declare @t table(i int unique)
insert into @t
select 1 union all
select null union all
select null
You will get the following error
Msg 2627, Level 14, State 1, Line 3
Violation of UNIQUE KEY constraint 'UQ__#A989971__3BD019979D26A3BB'. Cannot insert duplica......
|
|
-
|
|
Microsoft SQL Server comes with a whole range of system databases, which I visited in my post – How to programmatically identify system and user databases on a SQL Server instance. System databases are special, and there some very specific and peculiar characteristics of each (documentation for whic......
|
|
-
|
|
Often the most obvious information can be the most confusing - What does the "Number of Users" value in the Database Properties window of the Object Expolrer in SSMS really stand for? This post answers the question....
|
|
-
|
|
I see developers often confused on how they get the list of objects by IntelliSense when writing the code. Here are some points on how you can intelligently make use of IntelliSense.
When IntelliSense is enabled, in the query window, type SELECT and a s...
|
|
-
|
|
Arithmetic operators are used to perform arithmetic operations like addition, subtraction, multiplication and division. However the operators + ,- and ~ can also be used as unary operators to decide if a number is positive or negative. But we can have f...
|
|
-
|
|
The batch separator in SQL Server signals the end of the batch. By default SQL Server uses GO as the batch separator. However often people get confused on when they should use it compulsorily. Here are the cases where you must use batch separator
1 A...
|
|
-
|
|
Does creating a primary key always create a clustered index? Can a clustered index be created using a column other than the primary key? SQL Server has not such relation/rule between primary keys and clustered indexes....
|
|
-
|
|
DateSerial function accepts three paramter values year,month and day and return a valid date value with time set to midnight. SQL Server does not support this function until version 2012 is released.
There can be many ways to simulate this functionality...
|
|