Oracle Frequently Encountered Questions

前端之家收集整理的这篇文章主要介绍了Oracle Frequently Encountered Questions前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  • How do I get Year or Month etc From Date?
    Use the Extract Function
SELECT EXTRACT(MONTH FROM ORDER_DATE) ORDER_MONTH FROM ORDERS;
  • Can I use aliases in where clause?
    The answer is No
SELECT EXTRACT(MONTH FROM ORDER_DATE) ORDER_MONTH FROM ORDERS WHERE ORDER_MONTH = 10;--don't do this
SELECT EXTRACT(MONTH FROM ORDER_DATE) ORDER_MONTH FROM ORDERS WHERE EXTRACT(MONTH FROM ORDER_DATE) = 10;--do like this

猜你在找的Oracle相关文章