使用Oracle sql语句更改系统日期 [英] Change system date with Oracle sql statement

查看:121
本文介绍了使用Oracle sql语句更改系统日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


任何人都可以通过命令帮助我通过Oracle更改系统日期


/>
问候

Reshmi

Hi all,

Can any one help me with a command by which I can change the system date thru Oracle



Regards
Reshmi

推荐答案

Oracle从操作系统获取系统日期。关闭Oracle,更改操作系统日期并重新启动Oracle。这将为您提供新的Systemdate。


如果您没有关闭/重启Oracle,那么有时会产生问题。


希望这会有所帮助。
Oracle takes System date from the OS. Shut down Oracle, Change the OS date and restart Oracle. That will give you New Systemdate.

If you do not Shut down/ Restart Oracle, it some time creates problems.

Hope this helps.


您好


感谢您的时间。


但它不是我想要的东西。确切的问题是当我在表中进行更改时,如果某些条件满足,我将执行一个触发器,我将在其中更改系统日期本身。 (即;更新.... SYSDATE =''27 -Nov-2006'')这会产生错误,那我怎样才能更改SYSDATE ???


问候

Reshmi
Hi

Thanks for ur time.

But its not the thing I want. The exact problem is when I make changes in a table, and if some condition satisfies, I will execute a trigger in which I will change the system date itself. (ie; UPDATE.... SYSDATE = ''27-Nov-2006'') This will create an error , then how can I change the SYSDATE ???

Regards
Reshmi


使用1)nls_format_date


更改日期格式或使用


2)to_char,3)或To_date
Use 1)nls_format_date

To Change Date Format Or Use

2)to_char, 3)or To_date


这篇关于使用Oracle sql语句更改系统日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆