Click here to Skip to main content
16,015,108 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm doing a forum application which is using two columns (description and created date)in database. Now I want to display inserted data of description column one by one i.e, previous data first then later one and should continue same thing in datagrid.

help me out..
Posted
Updated 27-Oct-10 23:33pm
v2

Use datecolumn for displaying records descending order like

Select * from tablename order by desc
 
Share this answer
 
Just add a column ID and set its is identity specification yes and increment it by 1.

then write sql query as

select * from tablename order by id asc.

if u have to show selected records then use

select top(5)* from tablename order by id asc.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900