我正在使用下面的代码从SQL数据库中读取表和视图,这适用于Oracle表,但不适用于Oracle视图,有人知道它为什么不起作用以及我如何修复它吗?
cmdList = new OdbcCommand("select name, user_name(uid) from sysobjects where type='U' or type='V'", cn);谢谢
发布于 2009-10-02 11:11:33
Sybase/SQL Server: sysobjects
Oracle: ALL_OBJECTS
Notes: The corresponding Oracle tables is: all_objects (Displays all objects that are accessible
by the current user.)
Resolution: Query or make views on ALL_OBJECTS table like:
Select object_name from all_objects where object_type = 'TABLE';
Select object_name from all_objects where object_type = 'PROCEDURE';
Select object_name from all_objects where object_type = 'TRIGGER';https://stackoverflow.com/questions/1508608
复制相似问题