2)to_date
字符值->日期值
语法:to_date (string,[format mask],[nls_parameters])
参数:string 待转换的字符值
format mask:可选参数 格式掩码同to_char转换为date时相同。 备注:转换时要根据给定的string设定正确的格式掩码,否则 Ora_01840:input value is not long enough for date format. Ora_01862:the numeric value does not match the length of the format item.
3) to_number
字符值->数字值
语法:to_number (string,[format mask],[nls_parameters])
参数:string 待转换的字符值
format mask:可选参数 格式掩码同to_char转换为number时相同。 备注:如果使用较短的格式掩码就会返回错误。 例如: to_number(123.56,’999.9’)返回错误。