[Oracle]betweenで日付型条件を指定する

2021年9月7日

構文
日付項目between 日付1 and 日付2

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
SELECT
*
FROM
USER_TBL
WHERE
BIRTHDATE BETWEEN '20011001 00:00:00' AND '20211001 23:59:59'
ORDER BY
USERNO;
SELECT * FROM USER_TBL WHERE BIRTHDATE BETWEEN '20011001 00:00:00' AND '20211001 23:59:59' ORDER BY USERNO;
SELECT
  * 
FROM
  USER_TBL 
WHERE
  BIRTHDATE BETWEEN '20011001 00:00:00' AND '20211001 23:59:59' 
ORDER BY
  USERNO;

 

Oracle

Posted by arkgame