oracle查表字段

时间:2014-02-15 14:38:56
【文件属性】:
文件名称:oracle查表字段
文件大小:44KB
文件格式:DOC
更新时间:2014-02-15 14:38:56
oracle 表字段 下面为您介绍的是查询表的字段名的sql语句写法,sql语句可以实现许多的功能,希望可以您在学习sql语句使用方面获得启示。 1. select name from syscolumns where id = (select id from sysobjects where type = 'u' and name = '相应表名') 2. 3. 或者 4. 5. select name from syscolumns where id = object_id('相应表名') 用以上sql语句输入相应表名就可以查到表的字段名,对应好数据库 查询是否存在该表语句 而判断表名在数据库中是否存在的方法是 1. if not object_id('相应表名') is null 2. 3. print '存在'

网友评论