oracle 當行函數 日期,oracle當行

來源:互聯網
上載者:User

oracle 當行函數 日期,oracle當行

使用日期

 

Oracle內部使用數字儲存日期: 世紀,年,月,日,小時,分鐘,秒。

預設的日期顯示格式為DD-MON-RR。

--可以只指定年的後兩位,允許儲存21世紀日期在21世紀中。
--同樣,允許儲存20世紀的日期在21世紀中。

 

SELECT last_name, hire_date
FROM   employees
WHERE  hire_date < '01-FEB-88';

 

SELECT last_name, (SYSDATE-hire_date)/7 AS WEEKS
FROM   employees
WHERE  department_id = 90;

 


 


教一下各位,oracle資料庫中怎查詢表中的欄位被改變的時間?感謝大俠們

無法查詢此資訊

如果要自己實現,可以用觸發器實現:

比如記錄行修改: 增加 alterdate,增加觸發器,當行修改時,更新alterdate列

比如記錄列修改: 增加表(資料列修改記錄, 如果列修改時,記錄被修改的表、列、修改前的值、修改後的值)
 
大蝦幫忙ORACLE怎在指定的行當中插入資料?

update A2
set A2.時間 =(
select sum(A1.時間)
from A1
where A1.單位 = A2. 單位
group by A1.單位
)
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.