3 ms·
MS SQL Server allows statements that include '= NULL' in them. Like, 'SELECT * from foo WHERE foo_id = NULL'. One cannot do this in Oracle. This, in my opinion,
by stoolpigeon 15y ago
MS SQL Server allows statements that include '= NULL' in them. Like, 'SELECT * from foo WHERE foo_id = NULL'. One cannot do this in Oracle. This, in my opinion, indicates that Oracle is a better RDBMS.
- yread 15y agoI wouldn't argue for a "better" RDBMS with such a small silly feature. Obviously SQL Server is meant for developers (not DBAs) who are used to writing myCSVar = null. Besides you can turn it back on with SET ANSI_NULLS ON. Oracle also has a plenty of features which are not compatible with the standard (and which can't even be turned off) '' (empty string) being the same thing as null is really neat though!
- stoolpigeon 15y agoThat's just a pet peeve. The other two are bigger. But really it just irked me that he felt it necessary to add that Oracle wasn't better than MS SQL Server. There are cases where it most definitely is better. There may be cases where MS SQL Server is better (probably especially if one is running an all MS stack) but having worked as a full time DBA with both I know where I prefer to work. Of course I'm not a fan of windows either - so some of my preference for Oracle and PostgreSQL come from the fact that I get to manage them in my preferred environment.
- matwood 15y agoMSSQL probably has the '= NULL' syntax around for backwards compatibility. It does support the 'is null' and 'is not null' syntax that is in Oracle (which is standard IIRC).
- xxdiamondxx 15y agoI've always used 'is null' when working with SQL Server, but I guess the fact that it even allows you to use '= NULL' is what troubles you?
- thom 15y agoIt's an option which can be enabled or disabled to taste. It's no more egregious than empty strings being null in Oracle, though I've no doubt there are more persuasive arguments for why Oracle is a better RDBMS.
- cafard 15y agoAh, thanks. I hadn't encountered that.