开发者

Where cell is not equal to.. MySQL query (!=) [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhe开发者_Python百科torical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

Can someone tell me how I can do a MySQL query that selects all row with an id != 1?

Please give me example of it.


You didn't provide much detail, but it seems your own title answers the question: use WHERE id != 1. It works in MySQL, but the SQL standard is <>, not !=.


In standard ANSI SQL, not equal is represented as: <>


Try this one:

SELECT * FROM pages WHERE id <> 1

You also can use != instead of <>

SELECT * FROM pages WHERE id != 1


Use <> or !=, both works for MySQL

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜