无法访问to_char函数来更新记录 [英] Cannot access to_char function to update a record
本文介绍了无法访问to_char函数来更新记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<br />
Update student_record_database<br />
set date_of_birth = (to_char(''31/12/2000'',''dd/mm/yyyy''))<br />
where rollno=122;<br />
有什么问题在这段代码中?????
我只是想用指定的to_char格式更新日期。
在SQL中它显示如下错误:无效的数字
请帮助
What is wrong in this code?????
I just want to update the date in the specified to_char format.
In SQL it shows error like: Invalid number
Please Help
推荐答案
嘿,你这样添加to_date函数......
hey u hav add to_date function like this......
Update student_record_database
set date_of_birth = to_date(to_char('31/12/2000','dd/mm/yyyy'))
where rollno=122;
或使用
or use
Update student_record_database
set date_of_birth = (to_date('31/12/2000','dd/mm/yyyy'))
where rollno=122;
或者这将是明确的工作
or this will definitly work
Update student_record_database
set date_of_birth = to_char(to_date('31/12/2000','dd/mm/yyyy'))
where rollno=122;</pre>
这篇关于无法访问to_char函数来更新记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文