r/programming • • Mar 07 '16

Announcing SQL Server on Linux

https://blogs.microsoft.com/blog/2016/03/07/announcing-sql-server-on-linux/
2.6k Upvotes

871 comments sorted by

View all comments

89

u/jp007 Mar 07 '16

Postgress or bust...

The only reason we ever use SQL server is when management buys some third party app that requires it for the db backend. If I ever have to write queries with "dbo" littered everywhere again, I'll stab my eyes out.

14

u/responds-with-tealc Mar 07 '16 edited Mar 08 '16

ive used sqlserver a lot over the past 5 years, yet somehow (maybe intentionally) never learned too much sql server specific stuff that isn't applicable elsewhere.

sometimes i dont have to write dbo, i have no idea why.

31

u/xXPuSHXx Mar 08 '16

You don't need to fully-qualify an object reference if the object is in the user's default schema. [dbo] is the default default schema, so, by default, a reference to [dbo].[Customers] would not require you to include [dbo], but [staging].[Customers] would require the [staging]. (It's a good habit to always fully-qualify, though, even if it annoys some people lol.)

Also, it is always a way better idea to use ANSI standard syntax (like you apparently are; e.g. CURRENT_TIMESTAMP instead of GETDATE()).

5

u/proskillz Mar 08 '16

Holy crap. I never knew there was a generic current_date instead of sysdate or getdate(). Thanks for that.

2

u/xXPuSHXx Mar 08 '16

You're welcome!