The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
I use this all the time with our deployment scripts.
However, you have to be careful if your scripts have the remote chance of being executed in a non 2016+ db server. For us, this is an issue with some of our client dbs. For most shops this should not be an issue, I would think.
You are lucky if pre 2016 is not a problem for you... We still must support 2008 (and 6 months before 2005 too)...
I can count on one hand the customers upgraded to 2014 - and they all have academic price...
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018
DROP TABLE IF EXISTS SomeSchema.SomeTable
ELSE DROP SCHEMA SomeSchema; # clearly schema in worse shape then we were told, start over time
# or maybe they chose the wrong database??? ooooops
SELECT "Time to run away";
Like all the new features, it's nice when you can dictate the db server version. Don't forget about the compatibility level setting of the database as I found out last month!
Now, if they could just get the query designer to remember the layout (x,y) of objects when I'm working on a query....every time, scroll down, drag tables/views up where I can see them all, and reposition so it makes sense...run query, if anything is wrong, repeat. Also, if it could remember it's last window state/position/screen that would convince me to start using newer versions of SSMS.
For me, SSMS 2016 fails with some MEF error every other time I need to use it, so I still do most work with 2014. I have 2017 which is OK but still slower to start than 2014. I really only use it to import Azure dbs.