SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


OUTPUT & NEWID()


OUTPUT & NEWID()

Author
Message
Jason Selburg
Jason Selburg
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3727 Visits: 4110
Comments posted to this topic are about the item OUTPUT & NEWID()

______________________________________________________________________

Personal Motto: Why push the envelope when you can just open it?

If you follow the direction given HERE you'll likely increase the number and quality of responses you get to your question.

Jason L. Selburg
M&M
M&M
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3591 Visits: 3906
Good question. Thanks

M&M
bitbucket-25253
bitbucket-25253
SSCertifiable
SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)SSCertifiable (7.9K reputation)

Group: General Forum Members
Points: 7949 Visits: 25280
From:
http://dictionary.reference.com/browse/guarantee

"something that assures a particular outcome or condition:"

Sorry but my language comprehension is that means the ONLY answers are 2 or 9 or 11 and NEVER another value.

But the given explanation is
Surprisingly, there can be any number of rows from ZERO to the number of rows in the table being deleted from


contradicts what is supposedly the correct answer.

Oh well, another question that does not rely on the workings of the database engine, but rather english comprehension.

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
khelloufsofiane 6183
khelloufsofiane 6183
Mr or Mrs. 500
Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)Mr or Mrs. 500 (581 reputation)

Group: General Forum Members
Points: 581 Visits: 179
Hello,

I think the correct answer is none of the above, because the result can be 8 for example,
and any of the above means the result must be 2 , 9 or 11 and not another value.

anywhere thanks for the question.
Brigadur
Brigadur
SSChasing Mays
SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)

Group: General Forum Members
Points: 633 Visits: 27695
I answered "None of the above". After getting the explanation I still claim I answered right. The question was "... how many rows are gauranteed ...", so answer "Any of the above", well, questionable.

Interesting question though
Ninja's_RGR'us
Ninja's_RGR'us
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29605 Visits: 9671
Echoing here... since you're talking about garanteed # of rows, none is the only possible answer.
Richard Sisk
Richard Sisk
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2017 Visits: 210
Jeez, I hate it when the answer depends more on figuring out the author's intent in the answer than actually answering the question.

If the answer is any number of rows can be returned, then 2, 9, or 11 are NOT guaranteed.
rfr.ferrari
rfr.ferrari
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1539 Visits: 13628
great question! Initially, I analyzed the text in question and then I found the command's return is not fixed, after running it several times, really it can be any value according the correct answer.


rfr.ferrari
DBA - SQL Server 2008
MCITP | MCTS

remember is live or suffer twice!
the period you fastest growing is the most difficult period of your life!

roger.plowman
roger.plowman
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1275 Visits: 1253
Am I the only one who thinks "none of the above" is the correct response, because the script is so buggy it won't compile?

Unless I'm crazy you can't insert 'a' into the nDex field because nDex is an integer. When that script is copied to SSMS you get 3 incorrect sytax errors.

So the correct answer is "none of the above". Smile Because it's *guaranteed* you won't get any return values!
Ninja's_RGR'us
Ninja's_RGR'us
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29605 Visits: 9671
roger.plowman (4/25/2011)
Am I the only one who thinks "none of the above" is the correct response, because the script is so buggy it won't compile?

Unless I'm crazy you can't insert 'a' into the nDex field because nDex is an integer. When that script is copied to SSMS you get 3 incorrect sytax errors.

So the correct answer is "none of the above". Smile Because it's *guaranteed* you won't get any return values!


The insert will fail in 2k5, you have to change it to union alls... other than that the script will work (tho not as obviously intented and hence the question here)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search