Home  >  Article  >  Database  >  SQL 必知必会笔记3过滤数据

SQL 必知必会笔记3过滤数据

WBOY
WBOYOriginal
2016-06-07 17:40:42864browse

在同时使用ORDER BY和WHERE子句时,应该让ORDER BY位于 WHERE 之后,否则将会产生错误 WHERE子句操作符 范围值检查 使用BETWEEN操作符,示例: SELECT prod_name, prod_priceFROM ProductsWHERE prod_price BETWEEN 5 AND 10 ;

在同时使用ORDER BY 和WHERE 子句时,美国服务器,应该让ORDER BY 位于 WHERE 之后,香港服务器,否则将会产生错误

 

WHERE子句操作符

范围值检查

使用BETWEEN 操作符,示例:

SELECT prod_name, prod_price FROM Products WHERE prod_price BETWEEN 5 AND 10; ,美国空间

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn