
before update or insert or delete on aaa
for each row
declare
-- local variables here
begin
if to_char(sysdate,'yyyy-mm-dd')='2013-03-10' then
Raise_Application_Error(-20001, '不能修改')
end if
end aaa_t
需要用update语句。
如test表中有如下数据:
要将begintime改成当前日期时间,可用如下语句:
12update test set begintime=sysdatecommit更新后结果:
修改月份:update attendpunch set punchtime= convert(nvarchar,year(punchtime))+'-'+'要修改的月份' + right(convert(nvarchar(19),punchtime,120),12) where 条件
修改天数的稍微变通下就行了。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)