Doesn't Equal in SQL
I am wondering if there is some way to do a doesn't equal command in MYSQL. In other words, can you do a command like this: "SELECT * FROM someTitle WHERE someLabel != 'something'"? My code is returning an error 开发者_C百科when I attempt this.
Thanks for any help!
try this
SELECT * FROM someTitle WHERE someLabel <> 'something'
Try <> instead of !=
In SQL, like VB, <>
is used instead of !=
.
You can therefore write the following:
SELECT * FROM someTitle WHERE someLabel <> 'something'
I'm not sure how <>
can mean inequality; can anyone explain?
Use someLabel <> 'something'
instead.
Replace != with <>
精彩评论