August 15, 2013 at 11:29 pm
Stewart "Arturius" Campbell (8/15/2013)
Good back-to-stored proc basics question.
+1
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
August 16, 2013 at 12:50 am
Very good question....
There is a lil confusion to me....
When the second batch gets executed the Stored procedure created successfuly, as according to deferred name resolution process when an entry is made in a sys.sql_modules in which an object is used in a SP that is not existed, SP will get create successfully...
Now, while 3 batch gets executed, it does not the throw error and gets executed successfully as condition (1<>1) never gets executed. So, Does at the time of compilation only valid condition gets compiled and rest remained untouched?
While executing 4 batch, I read somewhere that after getting an entry into a sys.sql_module if we create an non existing object in a stored procedure it will give you an error as now it will check that all objects using in a SP exists or not....
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
August 16, 2013 at 8:39 am
Good question, but do agree the explanation could be improved.
August 19, 2013 at 8:08 pm
Great question. 2) and 4) should give a warning about the nonexistent table, but will run nevertheless.
I don't understand why 5% of the answers don't include the first option. I mean why would the create table statement not succeed :blink:?
August 20, 2013 at 5:18 am
Tough time!!!!!
August 27, 2013 at 1:47 am
Easy question for me. Experience paid for me.
Viewing 6 posts - 16 through 21 (of 21 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy