sql query the last seven days of data (to year - month - date results show)

sql code is as follows:

SELECT to_char (SYSDATE- LEVEL + 1, 'yyyy-mm-dd') today FROM DUAL connect BY LEVEL <= 7

Query results are as follows:

Guess you like

Origin www.cnblogs.com/henuyuxiang/p/11609256.html
Recommended