Hi singhanand2009,
You don't really give enough detail in your post for me to give you exact advice. What language are you using (VB.NET, C# etc) ? Which database platform are you using (MySQL, SQL Server, Access etc) ?
In general you retreive data from a database by using a query which says something like:
SELECT id FROM table WHERE id = somevalue
There is a tutorial here:
http://www.w3schools.com/sql/default.asp I suggest you go through it then come back to the relevant forum with any future questions.
Remember to include as much detail as possible in any future posts.
Hope this helps,
Dr B