In Query try this:
FOR TOP 5
select top 5 * from table
//——————-
FOR LAST 5
select top 5 * from table order by primarykey_columnname desc
Good Luck
Friday, January 23, 2009
Get Month Name from SQL
Hitry this SQL query to get month name
SELECT ID,datename(month,PostDate) as Month FROM yourTable
where PostDate is field in my table of datetime type
Good Luck
SELECT ID,datename(month,PostDate) as Month FROM yourTable
where PostDate is field in my table of datetime type
Good Luck
Subscribe to:
Comments (Atom)

