1
where _c1.name<>c2.name

I am confused with the symbol <>. Please explain its meaning.

mikej
  • 63,686
  • 16
  • 149
  • 130
NoviceToDotNet
  • 9,889
  • 32
  • 106
  • 163

3 Answers3

8

Greater than and less than.

In other words not equal to aka !=.

To put it rather confusingly != = <> , yes they can be used interchangeably.

NimChimpsky
  • 44,999
  • 57
  • 192
  • 304
  • Sure.You CAN - the author of the test you quote did chose not to. – TomTom Nov 08 '10 at 12:49
  • 2
    @NoviceToDotNet see this previous question http://stackoverflow.com/questions/723195/should-i-use-or-for-not-equal-in-tsql – mikej Nov 08 '10 at 12:52
3

It means "not equal to". It is an alternative to using !=. Here is a list of the operators used in SQL Server.

It comes from meaning < less than or > greater than. i.e. anything but equal.

mikej
  • 63,686
  • 16
  • 149
  • 130
3

It means different. Your clause indicates that _c1 and c2 must not have the same name value.

Romain Linsolas
  • 76,827
  • 47
  • 198
  • 269