sql server - error while creating table in mysql for generating auto serial number -



sql server - error while creating table in mysql for generating auto serial number -

i want create serial number table not view example:

table confirmationnumber:

serialno -------------- 00000001 00000002 00000003

and on (the serial number increment each time execute query).

for when creating table in sql as:

create table confirm ( confirmationid int, name varchar(10), sequencenumber right('0000000' + convert(varchar, confirmationid), 8) )

it's giving error:

error 1064 (42000): have error in sql syntax; check manual corresponds mysql server version right syntax utilize near 'as right('0000000' + convert(int, confirmationid), 8) )' @ line 9

can body help me?

remove sql-server tags.

put desired code in insert statements, or utilize trigger.

you can utilize zerofill attribute 0s automatically displayed.

mysql sql-server create-table

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -