----===帮忙写句sql命令!===------------

来源:百度知道 编辑:UC知道 时间:2024/06/27 05:22:21
真的郁闷,我写了一句不行。select max(class_rank) from news_class

表名:news_class
我要读取class_rank字段中的最大值(该字段是数字型数据)

试试
select * from news_class
where class_rank in (select max(class_rank) from news_class )
有点龌龊的说....
你看看你的数据库选的是不是自己的
查询分析器默认的是master库
如果是程序里的话我也无能为力了
因为我也不怎么会呢.....

select max(t_hetong_danjia) from t_hetonManage
我这样写能读取最大值地阿
t_hetong_danjia字段
t_hetonManage表名