Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use of Exclamation Mark?

Status
Not open for further replies.

Dashley

Programmer
Dec 5, 2002
925
US
Hi,

Im looking at sombody elses code and they have in a stored procedure:
Code:
IF @TermList != ''

I'm wondering whats the exclamation mark used for?



Thanks

Dan

 
!= means Not Equal To. Some people write it like... <>

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
SqlDenis

Wow thanks for the fast response. It was really bugging me. Is it a common practice to use ! instead of <> ?
I havent seen it used before.

Thanks again

Dan
 
It's more common in other programming languages than SQL, but still not all that uncommon.
 
The use of the exclamation for NOT (!=, !>, !<) is NOT SQL-92 standard. And like anything not SQL-92 standard, Microsoft will not guarantee that it will always be supported in future versions.

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top