|
|
-
|
|
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 ......
|
|
-
|
|
Without running these queries can you find out the query that would throw an error?
1 select 7*-2&.3
2 select 7|2&-3
3 select 7+-(.2)%(+3)
4 select ((7&2%3))
......
|
|
-
|
|
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 ......
|
|
-
|
|
When a datatype timestamp or rowversion is used, it generates unique value whenever a row is added or updated in a table. It is one of the ways to generate auto-generated values not only for insertion but for updation too. If you want to know the minimum active rowvertion number for a database, you ......
|
|
-
|
|
Without running the following code , can you guess the datatype of the column t?
select null+getdate()+772.67 as t into #t5
......
|
|
-
|
|
The system variable @@TRANCOUNT is used to get the number of transactions that are active. Consider the following code
begin transaction
select 3
select @@TRANCOUNT
commit transaction
The result of @@TRANCOUNT is 1. Consider the following code.
begin transaction
select 3
begin transac......
|
|
-
|
|
As I have informed you earlier in this post, there are some interesting tips I have contributed in December 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 stateme......
|
|
-
|
|
In the Query Analyser, set the Result mode to Text (Press CTRL+T) and run the following code
set nocount on
select
space(17-len(replicate(char(94),no)))+ replicate(char(94),no*2-1)
from
(
select top 10 row_number() over (order by name) as no from sysobject......
|
|
-
|
|
Often deveopers confuse themselves between Timestamp and Datetime datatypes. But they are entirely different datatypes. Although the name has Time, the Timestamp datatype has nothing to do anything with date or time. Also you cannot explicitely add/update that column. It gets updated whenever data a......
|
|
-
|
|
Assume that there is a database named test in the server and you want to take a backup of that database. Run the following code without specifying the path
backup database test to disk=''
You will get the following error messages
Msg 3044, Level 16, State 2, Line 1
Invalid zero-length device......
|
|