SELECT 1 FROM SYS.information_schema.tables LIMIT 1;
以下是一些查询INFORMATION_SCHEMA的示例,帮助你更好地了解如何使用这些视图和表。
查询所有空间的元数据信息:
SELECT * FROM SYS.information_schema.columns;
查询指定空间的表信息:
SELECT * FROM SYS.information_schema.tables WHERE table_schema = 'your_schema_name';
查询已删除的元数据对象:
SELECT * FROM SYS.information_schema.columns WHERE delete_time IS NOT NULL;
查询表的创建时间:
SELECT table_name, create_time FROM SYS.information_schema.tables WHERE table_schema = 'your_schema_name';
查询JOB HISTORY信息:
SELECT * FROM SYS.information_schema.job_history;
查询实例计算用量费用明细:
SELECT workspace_name, sku_name, measurements_consumption, amount
FROM SYS.information_schema.instance_usage
WHERE measurement_start >= '2026-05-01'
ORDER BY amount DESC;
查询对象权限授予情况:
SELECT grantee, granted_to, object_name, object_type, privilege_type
FROM SYS.information_schema.object_privileges
WHERE object_type = 'TABLE';