THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » SQL Server 2005 » sqL Server 2000 » Teaser   (RSS)
  • SQL Teaser: Guess the output

    What do you think will be the output? DECLARE @d datetime SET @d = '20071010' SELECT DATEADD(yy, DATEDIFF(yy, 0, @d)+1, -1)
    Posted to Denis Gobo (Weblog) by Denis Gobo on October 10, 2007
  • SQL Teaser PASS Special: Table Size

    What will be the outcome of this script?First we create a table with a total of 6000 bytesNext we increase col2 from 1000 to 2000 bytes, this will give us a total of 7000 bytesFinally we add col3 which has 1000 bytes, this will give us a total of 8000 bytes First run these two statements--Total size = 6000CREATE TABLE TestSize (Col1 ...
    Posted to Denis Gobo (Weblog) by Denis Gobo on September 21, 2007
  • Summer SQL Teaser #4 Nulls and Counts

    First create this table CREATE TABLE Teaser (ID int) INSERT Teaser VALUES(1) INSERT Teaser VALUES(2) INSERT Teaser VALUES(1) INSERT Teaser VALUES(2) INSERT Teaser VALUES(NULL) Without running this try to figure out what the result will be SELECT COUNT(*), COUNT(ID), COUNT(DISTINCT ID) FROM Teaser For some more NULL summer fun you can read NULL ...
    Posted to Denis Gobo (Weblog) by Denis Gobo on June 22, 2007
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement