I am using MySQL, I have a table called transaction_detail
the create table statement is
Create table transaction_detail(
tx_code varchar(25),
acct varchar(25),
ltx varchar(25),
crcy varchar(25));
I want to add a column called line_key with auto_increment by 1 in this. I know a way to create another table similar to this and add a column with auto_increment in that and insert all data from this table to a newly created table, but I am looking for a easier way like altering this table and adding a column with incremented value.