sql - how to write select statement like this? -
itemprop = "text">
I am using SQL Server 2008. I have a table that is made up of three columns, in the form of id string type, as the time of formatting of time as createtime and position as integer.
I want to select a record between all records, whose status is 10, and createtime is the most earlist at the same time
BTW: ID is a package package and I have an app There is also a time-period column.
Thanks in advance, George
SELECT TOP 1 * WHERE status = 10 order created
Comments
Post a Comment