Date query ran in PL/SQL Developer shows time, but does not show in Oracle SQL Developer

試著忘記壹切 提交于 2019-11-28 10:29:43

问题


The same query ran in PL/SQL Developer shows time, however it does not show in Oracle SQL Developer. Is there a way to get the time in SQL Developer?

In SQL Developer:

In PL/SQL:

This is the details of the date field:


回答1:


You can change this in the Tools / Preferences dialog of SQL developer:

  1. Select Database / NLS Parameters in the tree view on the left.

  2. Then put dd/mm/yyyy hh24:mi:ss into the Date Format field.

  3. Press OK to close the dialog.




回答2:


To make it simple: use to_char() function, it will work with SQL developer as well as Pl/sql.

select to_char(sysdate,'MM-DD-YYYY HH:Mi:SS') from table_name;




回答3:


Can't see your query, but in oracle, it would look like this:

 select sysdate from dual


来源:https://stackoverflow.com/questions/6838744/date-query-ran-in-pl-sql-developer-shows-time-but-does-not-show-in-oracle-sql-d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!