Jump to content

let a attribute auto start with aaaa by 1


xbl1
 Share

Recommended Posts

Hello; :):) How i can create a attribute auto start with aaaa by 1.for example; create table tset2(cid int primary key auto_increment, topic varchar(100), content varchar(100), referNo varchar start "aaaa" auto_increment,full text(topic, content, referNo))i want the referNo auto start with aaaa by 1

Link to comment
Share on other sites

An autonumber column has to be an integer. If you want a character column to do that, you will need to do it yourself. You may be able to convert the number to a character string, but in the database it needs to be a number.
i will change it to int, but how i can let it starts from 1000 by 1 Automaticly
Link to comment
Share on other sites

An autonumber or autoincrement column will increment itself automatically (hence the name). If you want it to start at 1000, there should be a SQL statement to set the current value, or you can also insert a row with an ID of 1000. It will start from that.

Link to comment
Share on other sites

An autonumber or autoincrement column will increment itself automatically (hence the name). If you want it to start at 1000, there should be a SQL statement to set the current value, or you can also insert a row with an ID of 1000. It will start from that.
Thanks :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...