错误见下图:
错误SQL语句:
SELECT column_name, data_type, column_default, is_nullable
FROM information_schema.tables AS t
JOIN information_schema.columns AS c ON t.table_catalog = c.table_catalog
AND t.table_schema = c.table_schema
AND t.table_name = c.table_name WHERE t.table_name = 'TAB01'
错误原因:
'information_schema.tables' 无效,字面意思就是information_schema数据库或tables表不存在。在sqlserve中数据库名称(表名称)启用了区分大小写。