get foreign table names mysql 1

get foreign table names mysql

select * from INFORMATION_SCHEMA.KEY_COLUMN_USAGE where TABLE_NAME = '';

Here is what the above code is Doing:
1. We’re creating a connection to the database.
2. We’re creating a cursor object.
3. We’re executing a query to get the column names of the table.
4. We’re fetching the results of the query.
5. We’re printing the results.

Similar Posts