回复 2楼 studyAsp
谢谢,因为表不能直接更改,只有先删除再插入.
我对oracal语法不太清楚,只是按sql2005格式搬过来执行不下去。
CREATE OR REPLACE PROCEDURE hm_gx_zlwz (cywdm NUMBER )
AS
BEGIN
CREATE table lsb AS SELECT * FROM yw_sxcd WHERE ywdm=cywdm
UPDATE lsb SET zlwz='8'
DELETE FROM yw_sxcd WHERE ywdm=cywdm
insert into yw_sxcd SELECT * from lsb
drop table lsb
END
出现如下错误:
PLS-00103: 出现符号 "CREATE"在需要下列之一时:
begin case declare exit
for goto if loop mod null pragma raise return select update
while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
[
本帖最后由 sdj_2003 于 2010-3-14 17:11 编辑 ]