|
|
Browse by Tags
All Tags » t-sql » Database Development
-
My colleague Jamie Thomson posted an intriguing article on DRY SQL which you can read all about here. It raised a number of questions for me so I thought I’d post my own response to it.
Here is a list of some of these questions that sprung to my mind. Did the code change come up with the same query plan? Were the tables indexed in ...
-
Crikey. That title sounds like an essay I had to write when I was at school and that was a long time ago...
Jamie Thomson raised an important point in a comment on a blog I posted yesterday entitled "Getting rid of getdate()". In it I stated that ISNULL() and COALESCE() are in the same boat as getdate() and ...
-
Ok I admit - I use it. Pretty much everyone I know uses it and yet I feel dirty when I do.
Why? Well it's not portable SQL and most certainly not ANSI standard. I need to get the datetime I hear you say. How do I do this without getdate()?
There is a perfectly good substitute in the form of CURRENT_TIMESTAMP that is ...
-
A colleague of mine asked for a simple example to get him up and running with the basics of bitmasking. Since I had gone to the effort to create the example I thought I might as well blog it :o).
This example uses the logical AND operator &.
First of all you need to define your table.. create table BitmaskDemo
(ID int Primary ...
-
This issue caught me out today whilst putting together some build scripts for reference data. So I thought I’d share it.
USE [tempdb]
GO
CREATE TABLE [dbo].[Table_1](
[Col1] [int] IDENTITY(1,1) NOT NULL,
[Col2] [char](1) NOT NULL
) ON [PRIMARY]
GO
delete from ...
|
|
|