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 Link to comment https://forums.phpfreaks.com/topic/19865-how-to-create-sequence/ 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 Link to comment https://forums.phpfreaks.com/topic/19865-how-to-create-sequence/#findComment-86929 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.... Link to comment https://forums.phpfreaks.com/topic/19865-how-to-create-sequence/#findComment-86931 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? Link to comment https://forums.phpfreaks.com/topic/19865-how-to-create-sequence/#findComment-86932 Share on other sites More sharing options...
redarrow Posted September 6, 2006 Share Posted September 6, 2006 smallint 6 zerofilled autoincrement not null Link to comment https://forums.phpfreaks.com/topic/19865-how-to-create-sequence/#findComment-87009 Share on other sites More sharing options...
stowell Posted September 8, 2006 Author Share Posted September 8, 2006 Thanks dude .... Link to comment https://forums.phpfreaks.com/topic/19865-how-to-create-sequence/#findComment-88281 Share on other sites More sharing options...
redarrow Posted September 8, 2006 Share Posted September 8, 2006 any time good luck. Link to comment https://forums.phpfreaks.com/topic/19865-how-to-create-sequence/#findComment-88283 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.