1
where _c1.name<>c2.name

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

mikej
  • 65,295
  • 17
  • 152
  • 131
NoviceToDotNet
  • 10,387
  • 36
  • 112
  • 166

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
  • 46,453
  • 60
  • 198
  • 311
  • 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
  • 65,295
  • 17
  • 152
  • 131
3

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

Romain Linsolas
  • 79,475
  • 49
  • 202
  • 273