How to get the MySQL table structure
I am developing a MySQL database table structure synchronization function. The client will request the structure of the specified table on the server and receive it through the Json string. Then the client will compare whether the local table structure is consistent. If not, it will generate SQL to make appropriate modifications.
The first problem I encountered was how to obtain the MySQL database table structure. I know that information_schema.COLUMNS can be queried to obtain most of the information, but the index is not included. Is there any way to obtain the index?
Or is there a better way to generate the SQL statements to create and modify tables?
PS: I am using UniDAC 9.4.0.