select * from user_tab_comments where table_name='UZK0BB';
解决方案 »
- 求个sql语句
- 高分请教高手 老版Oracle 8i order by 语句
- 急求Oracle sql语句
- 求varchar2型转换成number型的方法!
- 在oracle中,如何只进行索引扫描,而不是全表扫描
- 物化视图中的查询重写不启作用,请指教
- 问个日期转换的问题:我a表rq字段内容(DATE型)格式为:29-1月 -05,b表rq字段内容(DATE型)格式为:01/23/2005 00:00:00,我现在要比较日期
- LINUX路径问题
- oci传递参数给plsql时是否必须一一对应,如果plsql中有缺省的参数,是否可以不传递?
- PLSQL DEVELOPER 11.0 列合计不好使的问题大家怎么解决的
- 求过程
- 求“新建用户Test”的操作步骤(在线等)
select COMMENTS from user_tab_comments where table_name='TBMI_MEDSORT';
--检索表的字段
select COLUMN_NAME from user_tab_columns where table_name='TBMI_MEDSORT';
--检索字段的注释
select * from user_col_comments where table_name='TBHIS_DRUGUNIT';
'-------------------------------
Private Function InitTabStru(ByVal strTName As String) As Integer
On Error GoTo ErrLiner
Dim intTemp As Integer
Dim strFieldsEn As String '字段英文名列表
Dim strFieldsCn As String '字段中文名列表
Dim strSql As String
Dim rsTemp As ADODB.Recordset
intTemp = 3 '需要填充3项内容[表名注释,字段列表,字段注释]
'填充表名的注释
strSql = "select COMMENTS from user_tab_comments where table_name='" & strTName & "'"
Set rsTemp = DbConn.Execute(strSql, 2)
If rsTemp.EOF Then
MsgBox "检索数据表结构发生错误!", vbInformation + vbOKOnly, "提示"
Exit Function
Else
txtInput(1).Text = IIf(IsNull(rsTemp.Fields(0)), "未知", rsTemp.Fields(0))
intTemp = intTemp - 1 '填充完一项
End If
'填充表的字段名,字段注释
strSql = "select * from user_col_comments where table_name='" & strTName & "'"
Set rsTemp = DbConn.Execute(strSql, 2)
If rsTemp.EOF Then
MsgBox "检索数据表结构发生错误!", vbInformation + vbOKOnly, "提示"
Exit Function
Else
strFieldsEn = "|": strFieldsCn = "|"
Do Until rsTemp.EOF
strFieldsEn = strFieldsEn & rsTemp.Fields("COLUMN_NAME") & "|"
strFieldsCn = strFieldsCn & IIf(IsNull(rsTemp.Fields("COMMENTS")), "未知", rsTemp.Fields("COMMENTS")) & "|"
rsTemp.MoveNext
Loop
txtInput(2).Text = strFieldsEn: txtInput(3).Text = strFieldsCn intTemp = intTemp - 2 '填充完两项
End If
InitTabStru = intTemp: Exit Function
ErrLiner:
InitTabStru = Err.Number
MsgBox "检索数据表结构发生错误!" & vbNewLine & Err.Description, vbInformation + vbOKOnly, "提示"
End Function