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


OUTPUT & NEWID()


OUTPUT & NEWID()

Author
Message
Jason Selburg
Jason Selburg
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11063 Visits: 4131
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
SSCrazy Eights
SSCrazy Eights (9.7K reputation)SSCrazy Eights (9.7K reputation)SSCrazy Eights (9.7K reputation)SSCrazy Eights (9.7K reputation)SSCrazy Eights (9.7K reputation)SSCrazy Eights (9.7K reputation)SSCrazy Eights (9.7K reputation)SSCrazy Eights (9.7K reputation)

Group: General Forum Members
Points: 9656 Visits: 3916
Good question. Thanks

M&M
bitbucket-25253
bitbucket-25253
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26675 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
Say Hey Kid
Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)

Group: General Forum Members
Points: 665 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
SSC Eights!
SSC Eights! (981 reputation)SSC Eights! (981 reputation)SSC Eights! (981 reputation)SSC Eights! (981 reputation)SSC Eights! (981 reputation)SSC Eights! (981 reputation)SSC Eights! (981 reputation)SSC Eights! (981 reputation)

Group: General Forum Members
Points: 981 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
SSC Guru
SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)

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

Group: General Forum Members
Points: 2217 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
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3087 Visits: 13645
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
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3532 Visits: 1466
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
SSC Guru
SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)SSC Guru (116K reputation)

Group: General Forum Members
Points: 116314 Visits: 9672
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