|
|
-
|
|
Did you know that table variables are stored in the tempdb database for execution scope only?. Ok. Let us run this code
declare @t table(i int)
select * from tempdb.INFORMATION_SCHEMA.TABLES
The result is
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE
--------------------......
|
|
-
|
|
As you all know tempdb is responsible of storing all the temporary objects created for a server. One of my co-workers asked me "what is the scope of permanent tables created in the tempdb database?". The answer is it can be accessed via tempdb from various connections just like objects are accessed ......
|
|
-
|
|
One of the members in the forum asked about using decimal datatype in identity column. The question was "Is decimal point allowed in the identity column?" Ok. The identity column can never have any decimal points. It is a whole number. The decimal datatype can be used to have a bigger number in the ......
|
|
-
|
|
Both these functions are used to convert values from one datatype to another But there are some differences between them 1 CAST is ANSI standard and CONVERT is specific to SQL Server 2 CAST can't be used for formating purposes. But CONVERT can be used for formating purposes particularly on datetime ......
|
|
-
|
|
When you run the following codeselect name from sys.objects
having 1=1
you get the following error Msg 8120, Level 16, State 1, Line 2
Column 'sys.objects.name' is invalid in the select list because it is not contained in either an aggregate function or...
|
|
-
|
|
Consider the following CREATE TABLE statementsCREATE TABLE emp1(emp_id int,)
GO
CREATE TABLE emp2(emp_id int,first_name varchar(50),)
GONote that there is extra comma after the datatype of last column. But SQL Server ignores it and execute them without ...
|
|
-
|
|
SQL Server Integration Services (SSIS) is one of the tools that can be effectively used to transfer data to various destinations. In versions prior to 2005, we had Import/Export wizard which was part of Database Engine and a package would be created bas...
|
|
-
|
|
I have posted a blog post about Different ways to remove TIME part from DATETIME values where I have shown six different ways to remove TIME part. Some of the regular users posted some alternate methods. Here is the analysis of how long each method take...
|
|
-
|
|
As you know I have started a new series on "Exploring SSMS" by which I will be posting some features that are available in SSMS which will be very helping during the development. In this post we will see how to make use of the option “Search i...
|
|
-
|
|
Often peple ask this question in the forum. "I created a procedure with proper alignment. But when I wanted to alter the procedure, result of sp_helptext did not keep the original alignment. How do I keep the original format?"
Well. One answer is to make use of Script Stored Procedure --> ALTER TO ......
|
|