I just want to create the serial number into the table not just for view only for example:
table ConfirmationNumber:
SerialNo
--------------
00000001
00000002
00000003
and so on (the serial number will be increase each time i execute the query).
For that when I am creating a table in sql as:
CREATE TABLE confirm
(
ConfirmationID int,
name varchar(10),
SequenceNumber AS RIGHT('0000000' + convert(varchar, ConfirmationID), 8)
)
it's giving an error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'AS
RIGHT('0000000' + convert(int, ConfirmationID), 8)
)' at line 9
Can any body help me?