使用todate列从表格中选择最大日期 [英] Select max date from the table using todate column

查看:150
本文介绍了使用todate列从表格中选择最大日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我想使用todate列从表中选择最大日期.我想从最近发生的交易中选择此日期.

请帮助.

Hello

I want to select max date from the table using todate column. and i want to select this todate from last transaction happen.

Plz help.

推荐答案

有两种方法可以解决您的问题

there is two method which will solve your problem

select top 1 ToDate from UrTable order by ToDate desc
select max(ToDate) from UrTable


试试这个:

Try This :

"SELECT fileds FROM tablename WHERE (date=(SELECT  MAX(date) FROM  tablenmae ))";




希望对您有帮助..




hope this will help you..


这篇关于使用todate列从表格中选择最大日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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