oraclesql语句笔记

1、

ORA-00947:Not enough values

原因:values没有写足够的值与select()中的字段对应

2、查看一张表中共有多少个字段

select count(*) from user_tab_columns t where t.TABLE_NAME='表名/视图名'

3、

ORA-01747: user.table.column, table.column 

原因:sql语句拼写错误(我是最后一个字段多了一个逗号)

4、ORA-01861: literal does not match format string

原因:sql语句中字符串不匹配,如果直接按照字符串方式,或者,直接使用'2013-2-26 11:07:25',没有指定日期格式,就会报错

正确格式:to_date('2013-2-26 11:07:25' , 'yyyy-mm-dd hh24:mi:ss')

猜你喜欢

转载自www.cnblogs.com/shouhutian/p/9892239.html
今日推荐