简单的sql select命令 [英] simple sql select command

查看:54
本文介绍了简单的sql select命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从表格邮件中获得ID的最高整数值.

我为此使用了此命令,但是它不起作用...

从邮件中选择ID,其中id> =(从邮件中选择ID)"

请提出一些建议.....

解决方案

  SELECT  MAX( id) FROM 邮件其中 ... 


请参阅SQL MAX() [ MAX T -SQL [^ ]


尝试:

  SELECT  MAX(id) FROM 邮件


只需尝试……从邮件中选择MAX(id)
有关更多详细信息,请参见此... http://www.w3schools.com/sql/sql_func_max.asp [ ^ ]


i want to get the highest integer value of the id from the table mails.

i m using this command for it, but it is not working...

" select id from mails where id>= (select id from mails) "

pls suggest something.....

解决方案

SELECT MAX(id) FROM mails where ...


see SQL MAX()[^] or MAX T-SQL[^]


Try:

SELECT MAX(id) FROM mails


Simply try...... SELECT MAX(id) FROM mails
For more details see this... http://www.w3schools.com/sql/sql_func_max.asp[^]


这篇关于简单的sql select命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆