|
|
-
|
|
As you know NULL is the absence of data and any datatype can be NULL. But by default a NULL value is considered to be of INT datatype. Let us run the following code
select null as t into #t
GO
exec tempdb..sp_help #t
A NULL value is copied to a temporary table #t. Second resultset of sp_help ......
|
|
-
|
|
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 know if a procedure is extended stored procedure.
In the Object Explorer, goto Database......
|
|
-
|
|
Consider the following table
create table #t(id int, names varchar(100))
insert into #t
select 1,'name1'
union all
select 2,'name2'
Consider the following select statement
select id from #t
order by id,id
It returns the error
Msg 169, Level 15, State 1, Line 3
A column has been spe......
|
|
-
|
|
You can use Ordinal position in the ORDER BY Clause for sorting the resultset. The ordinal position refers the column position in the SELECT statement. Consider the following select statement
select * from
(
select 17 as a,2 as b
union all
select 1 as a,25 as b
) t
order by 1
The above......
|
|
-
|
|
As I have informed you earlier in this post, there are some interesting tips I have contributed in September 2011. You may find them interesting if you follow them. The following are some of my tips I posted there
Most Learned Posts of all time
You can drop multiple tables using single DROP statem......
|
|
-
|
|
Pinal Dave, SQL Server MVP, Blogger,Speaker and Evangelist is the co-author of the part 4 of the series SQL Programming Joes 2 Pros: Programming & Development For Microsoft SQL Server 2008 (SQL Exam Prep Series 70-433 (Volume IV)
This book is good one for those who are interested in learning S......
|
|
-
|
|
One of my friends asked me if it is possible to get SQL Server version number and edition name by parsing the result returned from @@VERSION. The system function @@VERSION gives information about the version and operatiing system information of the Server.
The following code parses the result of @@......
|
|
-
|
|
Out of these four queries, only one query will throw an error. Without running these queries find out the query and error message that it would generate.
Queries
Query 1 : select top 1 1 from sysobjects,syscolumns where 1=1
Query 2 : select top 1 1 from syscolumns,syscolumns where 1=1
Query 3 : ......
|
|
-
|
|
Many of you know that new quiz series for DBAs has started at www.beyondrelational.com. You can find all questions here. I am one of the quiz masters and I have an interesting question for DBAs. Here is the detail of the question that I ask.
Assume that in your database there is a table named test ......
|
|
-
|
|
Yes but partly. Let us explore this with examples
We have a system procedure sp_who that returns the informations about the current connections, users, sessions etc. Let us create a new database named test and create sp_who inside it.
Case 1
Create database test
GO
Use test
GO
create procedu......
|
|