create function is_date(p_date date)
return varchar2
as
a date;
begin
a:=p_date;
return 1;
exception
when others then
return 0;
end;
/select is_date(col_date) from table_name;--这样就可以测试字段是什么类型
return varchar2
as
a date;
begin
a:=p_date;
return 1;
exception
when others then
return 0;
end;
/select is_date(col_date) from table_name;--这样就可以测试字段是什么类型
RESPONSE.WRITE VARTYPE(VAR)
常数
值
描述
vbEmpty
0
未初始化(缺省〕
vbNull
1
包含不正确的数据
vbInteger
2
整数Integer子类型
vbLong
3
长整数Long子类型
vbSingle
4
单精度Single子类型
vbDouble
5
双精度Double子类型
vbCurrency
6
Currency子类型
vbDate
7
Date子类型
vbString
8
String子类型
vbObject
9
对象
vbError
10
Error子类型
vbBoolean
11
Boolean子类型
vbVariant
12
变量体(仅用于变量体数组)
vbDataObject
13
数据访问对象
vbDecimal
14
Decimal子类型
vbByte
17
Byte子类型
vbArray
8192
数组