首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

这句话如何错了

2012-03-22 
这句话怎么错了SELECT * FROM marryagedb order by stockdate where stockid002178.SZ[解决办法]把whe

这句话怎么错了
SELECT * FROM marryagedb order by stockdate where stockid="002178.SZ";

[解决办法]
把where子句跟order子句位置换一下,
[解决办法]
SELECT * FROM marryagedb where stockid="002178.SZ" order by stockdate ;
[解决办法]
order by 的句子写在最后~~
[解决办法]
5楼的对。帖一个完整的select语句语法:
SELECT
[ALL | DISTINCT | DISTINCTROW ]
[HIGH_PRIORITY]
[STRAIGHT_JOIN]
[SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
[SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]
select_expr, ...
[INTO OUTFILE 'file_name' export_options
| INTO DUMPFILE 'file_name']
[FROM table_references
[WHERE where_definition]
[GROUP BY {col_name | expr | position}
[ASC | DESC], ... [WITH ROLLUP]]
[HAVING where_definition]
[ORDER BY {col_name | expr | position}
[ASC | DESC] , ...]
[LIMIT {[offset,] row_count | row_count OFFSET offset}]
[PROCEDURE procedure_name(argument_list)]
[FOR UPDATE | LOCK IN SHARE MODE]]

热点排行