Madeira  

Win a Free Ticket to one of Madeira’s Courses

תאריך: 25 אוקטובר, 2011 | מאת: Madeira

The first person to answer correctly on the following quiz will win a free ticket to one of the following courses:

For more info on these courses, see the courses catalog.

When you send us your answer, don’t forget to mention which course you want, in case you win!

Here’s the Quiz:
How come the exact same data is spread in the first table over one Data Page and in the second table spread over two Data Pages?

CREATE TABLE #MyFirstTable
(
Id INT NOT NULL IDENTITY(1,1),
Data NCHAR(1000) NOT NULL
)
GO
CREATE TABLE #MySecondTable
(
Id INT NOT NULL IDENTITY(1,1),
Data NCHAR(1000) NOT NULL
)
GO
-- Insert very important data into #MyFirstTable, Use one Insert
INSERT INTO #MyFirstTable
(
Data
)
SELECT N'Win'
UNION ALL
SELECT N'A'
UNION ALL
SELECT N'Free'
UNION ALL
SELECT N'Ticket'
GO
-- Check how many pages #MyFirstTable uses
DBCC IND (2, '#MyFirstTable', -1)
GO
-- Insert the same very important data into #MySecondTable, Use multiple Inserts
INSERT INTO
#MySecondTable (Data)
SELECT N'Win'
GO
INSERT INTO
#MySecondTable (Data)
SELECT N'A'
GO
INSERT INTO
#MySecondTable (Data)
SELECT N'Free'
GO
INSERT INTO
#MySecondTable (Data)
SELECT N'Ticket'
GO
-- Check how many pages #MySecondTable uses
DBCC IND (2, '#MySecondTable', -1)
GO

Good Luck !

If you don’t know the answer but still want to register, press here.



תגיות מתוך הפוסט


תגובות הגולשים

  1. מאת ליטל:

    היי, מעניין ביותר.יש לי השערה אבל אחכה לתשובה מושכלת יותר.
    תודה.

על-מנת להשאיר תגובה אנא הכנס את הפרטים או התחבר




הערה: התגובות עוברות סינון, לאחריו תופיע התגובה. אין צורך להכניס שוב את התגובה.

תגובות אחרונות