oracel积累

在参数化的时候,.net是用@,但是oracle使用:

SELECT * FROM Table WHERE ColumnName=:ColumnName

获取前10行记录:

SELECT * FROM Table WHERE ROWNUM<=10

获取当前用户的字段:

--查字段
select * from user_tab_cols
where table_name=upper('YW_GAJ_DGSGAJ_SYRKXX')
order by COLUMN_NAME

--查字段注释
SELECT * FROM user_col_comments WHERE TABLE_NAME='YW_GAJ_DGSGAJ_SYRKXX'
AND column_name='rkzpid'

获取当前用户的表名和表注释

select a.TABLE_NAME,b.COMMENTS
from user_tables a,user_tab_comments b
WHERE a.TABLE_NAME=b.TABLE_NAME
order by TABLE_NAME 

 

你可能感兴趣的:(oracle)