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? Quote Link to comment 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] Quote Link to comment Share on other sites More sharing options...
fenway Posted October 4, 2006 Share Posted October 4, 2006 And you should make it UNSIGNED. 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.