stowell Posted September 6, 2006 Share Posted September 6, 2006 Hi Guys,Someone please help me I dont know how to create a sequence from phpmysql I have a cloumn and i want a default value that will start from 000001,000002,000003...........Thanks,Stowell Quote Link to comment Share on other sites More sharing options...
Moon-Man.net Posted September 6, 2006 Share Posted September 6, 2006 Have a look at auto int in SQL Quote Link to comment Share on other sites More sharing options...
stowell Posted September 6, 2006 Author Share Posted September 6, 2006 thanks, but auto_inc only increment by 0,1,2,3 what i want is the default value of the column will be 000001,000002.... Quote Link to comment Share on other sites More sharing options...
Moon-Man.net Posted September 6, 2006 Share Posted September 6, 2006 Why do you want that? could you store it as auto int, then pad it to the left with so many chars?What is the applicaion? Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 6, 2006 Share Posted September 6, 2006 smallint 6 zerofilled autoincrement not null Quote Link to comment Share on other sites More sharing options...
stowell Posted September 8, 2006 Author Share Posted September 8, 2006 Thanks dude .... Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 8, 2006 Share Posted September 8, 2006 any time good luck. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.