|
|
-
|
|
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 display line number in query window.
When you write queries in Query window, the line nu......
|
|
-
|
|
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 insert code template for creating a table, stored procedure, login etc in the SQL Server ......
|
|
-
|
|
I had blogged about Different ways to know structure of the tables. One of the methods is to highlight the object name and press Alt+F1. But this will not work if the object name contains multiparts ie database name, owner name etc.
Consider the following object
sys.objects
Applying Alt+F1 wil......
|
|
-
|
|
There are many aggregate functions available in SQL Server. One thing that most of the people forget is that Aggregate functions always return atleast a row no matter if there are rows in the table or where clause returns or does not return any resultset
Consider the following example
declare @t......
|
|
-
|
|
Without running the following code , can you guess the datatype of the column t?
select null+getdate()+772.67 as t into #t5
......
|
|
-
|
|
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......
|
|
-
|
|
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 enable/disable IntelleSense.
IntelliSense, which was introduced in SQL Server 2008, allo......
|
|
-
|
|
A Leap year contains an extra day so there are 366 days. There are many ways to find out whether the year is a Leap year. If the value of is_leap_year is 1 it is a Leap year otherwise it is not a Leap year.
Method 1 : General method
declare @year int
set @year=2000
select
case
when @y......
|
|
-
|
|
The symbol dot (.) plays a major role when you write queries It is mainly used to speicify the columns for the respective tables when a join is used as you see in the following example
select
t1.col1,t1.col2,t2.col3,t2.col4
from
table1 as t1 inner join table1 as t2 on t1.col1=t2.col1
......
|
|
-
|
|
This post follows my blog post Understanding datetime column part I
Date FormatsUnambiguous formats YYYYMMDD YYYYMMDD HH:MM:SS YYYY-MM-DDTHH:MM:SS Ambiguous formats DD/MM/YYYY MM/DD/YYYY DD-MM-YYYY MM-DD-YYYY YYYY-MM-DD etc
Someone wants to input dates in DD/MM/YYYY format
Declare @test table(......
|
|