mbvo Posted October 4, 2006 Share Posted October 4, 2006 I'm trying to display data that no one field is required to be unique, so I want to make an automatic field that contains a number. but there's no auto incriment data type for sql. what do i do? Link to comment https://forums.phpfreaks.com/topic/22993-auto-incriment/ Share on other sites More sharing options...
obsidian Posted October 4, 2006 Share Posted October 4, 2006 auto increment is not a datatype but rather an attribute. if you're wanting an auto incrementing column, just set it up in your create table statement like this:[code]CREATE TABLE myTable ( id int(11) auto_increment primary key -- continue your table on here --[/code] Link to comment https://forums.phpfreaks.com/topic/22993-auto-incriment/#findComment-103803 Share on other sites More sharing options...
fenway Posted October 4, 2006 Share Posted October 4, 2006 And you should make it UNSIGNED. Link to comment https://forums.phpfreaks.com/topic/22993-auto-incriment/#findComment-103899 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.