Plsql 如何动态更新特定列
我使用下表Plsql 如何动态更新特定列,plsql,oracle11g,Plsql,Oracle11g,我使用下表 book_Catalog contains book name, book_id, book_title, created_by(contains the detail which user created this entry), updated_by(contains the detail which user updates this entry) created_by column uses the system date 请给出一个想法
book_Catalog contains
book name,
book_id,
book_title,
created_by(contains the detail which user created this entry),
updated_by(contains the detail which user updates this entry)
created_by column uses the system date
请给出一个想法
应该使用什么查询来填写“按列更新”
提前感谢,
Ashmitha您可以使用
CREATE PROCEDURE UPDATE_BOOK_CATALOG_UPDATED_BY
(pin_BOOK_ID BOOK_CATALOG.UPDATED_BY%TYPE)
IS
BEGIN
UPDATE BOOK_CATALOG
SET UPDATED_BY = UID
WHERE BOOK_ID = pin_BOOK_ID;
END UPDATE_BOOK_CATALOG_UPDATED_BY;
共享和享受。您可以使用更新后触发器来完成此操作
CREATE OR REPLACE TRIGGER My_Trigger
AFTER INSERT
ON TABLE
FOR EACH ROW
DECLARE
BEGIN
END;/
代码格式在哪里?您是否刚刚完成了一个涵盖触发器的类?