Should I use != or for not equal in T-SQL?

Most databases support != (popular programming languages) and <> (ANSI).

Databases that support both != and <>:

  • MySQL 5.1: != and <>
  • PostgreSQL 8.3: != and <>
  • SQLite: != and <>
  • Oracle 10g: != and <>
  • Microsoft SQL Server 2000/2005/2008/2012/2016: != and <>
  • IBM Informix Dynamic Server 10: != and <>
  • InterBase/Firebird: != and <>
  • Apache Derby 10.6: != and <>
  • Sybase Adaptive Server Enterprise 11.0: != and <>
  • Mimer SQL 11.0: != and <>

Databases that support the ANSI standard operator, exclusively:

  • IBM DB2 UDB 9.5: <>
  • Microsoft Access 2010: <>

Leave a Comment