1
A
回答
6
SELECT * FROM table_name WHERE type != 'news';
是一種方法,如果您有多個:
SELECT * FROM table_name WHERE type NOT IN('news', 'other');
2
SELECT * FROM myTable WHERE type != 'news'
1
`SELECT * FROM atable WHERE type != 'news'
保留儘可能多的查詢,你可以到數據庫中,這就是他們是什麼!
-2
它實際上是
SELECT * FROM MY_TABLE其中Type NOT LIKE '新聞'
1
ANSI的答案將是 SELECT * FROM table_name的WHERE型<> '新聞'
!=不SQL中不錯的不等式運算符。不使用通配符的'NOT LIKE'與<>運算符完全相同。如果您必須檢查許多字符串的等式(或不等式),NOT IN也是最好的解決方案。
P.S.我寧願將其作爲評論發佈,但恐怕我並不完全理解StackOverflow,但我還沒有做到這一點(或者我沒有足夠的評論聲望)。
相關問題
- 1. php mysql where clause
- 2. PHP MYSQL WHERE錯誤
- 3. MySQL的PHP多WHERE子句
- 4. PHP PDO - MySQL的INSERT用WHERE
- 5. php mysql where where clause使用日期
- 6. PHP MySQL在where子句
- 7. PHP MySQL select * WHERE id => 100
- 8. PHP MySql - SELECT where similar_text()> x
- 9. MDX除了where子句中的函數
- 10. mysql:'WHERE something!= true'排除NULL的字段
- 11. 刪除與MySQL中的WHERE EXISTS查詢
- 12. MySQL的時間戳,where子句在PHP
- 13. PHP + MySQL的 「WHERE ... IN」 不工作
- 14. PHP/MySQL的轉換陣列WHERE子句
- 15. PHP MySQL的刪除
- 16. PHP的MySQL刪除
- 17. MySQL的與WHERE
- 18. MySQL的WHERE IN()
- 19. 從mysql表中刪除使用where和where條件
- 20. mysql php where子句不起作用
- 21. PhP MySQL「WHERE」查詢返回null /爲空
- 22. (PHP,MYSQL)用多個WHERE更新多行
- 23. PHP MYSQL比較行WHERE語句
- 24. PHP MySQL選擇與WHERE列未找到?
- 25. PHP和MySQL可選WHERE條件
- 26. 在MySQL PHP - WHERE子句 - 不工作
- 27. MySQL where where clause with microseconds
- 28. MySQL加入where where子句
- 29. Java mySQL multiple where Where子句
- 30. MySQL Multiple Select,Where Where子句
從這裏開始:http://en.wikipedia.org/wiki/Relational_operator#Standard_relational_operators提示:你需要的是在表的第二行。 – 2010-10-22 21:45:04