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

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -