Reputation: 1799
Is there a way to do this?
In case the DBMS command history got cleaned or, in my case, when many ALTER TABLE were used in the course of time.
I'm using MySQL.
Upvotes: 1
Views: 158
Reputation: 270637
Yes, it is as simple as
SHOW CREATE TABLE yourtable;
This will include all the subsequent ALTER TABLE
statements. You cannot retrieve the table's original state.
Here is the relevant documentation
Upvotes: 6