查詢DB所有的資料表
SELECT * FROM INFORMATION_SCHEMA.TABLES ORDER BY TABLE_NAME
查詢資料表欄位資訊
SELECT * FROMINFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ‘TableName’
查詢資料表的PK欄位
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME = ‘TableName’