要查看表在哪個包里,您可以使用以下SQL語句查詢DBA_OBJECTS視圖:
SELECT OWNER, OBJECT_NAME, OBJECT_TYPE, STATUS
FROM DBA_OBJECTS
WHERE OBJECT_TYPE = 'PACKAGE'
AND OBJECT_NAME IN (
SELECT OBJECT_NAME
FROM DBA_OBJECTS
WHERE OBJECT_TYPE = 'TABLE'
AND OBJECT_NAME = 'YOUR_TABLE_NAME'
);
將"YOUR_TABLE_NAME"替換為您要查找的表名。此查詢將返回包含該表的包的所有者、包名、對象類型和狀態(tài)。