Someone asked how to determine the day of the week?
Select to_char (sysdate, 'D') from dual
Obviously, this sentence cannot complete the required function, because it only shows the day of the current week, while foreigners regard Sunday as the first day of each week, the work und is to find the day of the week from the previous day. Isn't it the day of the week from today:
Select to_char (sysdate-1, 'd) from dual
Display Method at noon:
SQL> select to_char (sysdate, 'day') day from dual;
Day
------
Sunday
English display method:
SQL> select to_char (sysdate, 'day', 'nls _ date_language = American ') day from dual;
Day
---------
Sunday
Of course, you can also directly change the language settings of the current session:
SQL> alter session set nls_date_language = 'American ';
The session has been changed.
SQL> select to_char (sysdate, 'day') day from dual;
Day
---------
Sunday