Login form
i am making a login windows form for my application. user has to first logon to go to the MDI form and then further proceed to other forms. in my database table i have assign a tableId column and i want to increase the id on any addition to the database table. but i want to increase the table id as "0000" that means in four digits. when it will increase it will show 0001 in the table. please help.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Roei BarRank #1,271 · 1.4K reputationPosted Aug 20, 2009, 11:14 PM EDT
siva sakthi8 reputationPosted Aug 21, 2009, 1:21 AM EDT
Its not possible to your need with int column.
yeah its possible with varchar type.
while you query to the front end, just pad the zeros infront of the actual id and get the result.
SELECT RIGHT ('0000'+ CAST (eno AS varchar), 4) from tablename
you can easily do your need with this..
if u ve any query let me know...