这个sqlserver的存储过程如何改成ORACLE的???
REATE PROCEDURE departmentadmin
@parentdepartmentID int,
@departmentname varchar(40),
@tel1 varchar(30),
@tel2 varchar(30),
@fax varchar(30),
@ispublic bit,
@departmentid int OUTPUT,
@IsStepPass bit
AS
DECLARE @id int
select @id=departmentid from departments where parentdepartmentid=@parentdepartmentID and
departmentname=@departmentname
if @id is null
begin
insert into departments (parentdepartmentid,departmentname,tel1,tel2,fax,ispublic,IsStepPass)
values( @parentdepartmentID, @departmentname,@tel1, @tel2 ,@fax,@ispublic,@IsStepPass)
set @departmentid=@@identity
end
else
begin
set @departmentid=-1
end
GO
@parentdepartmentID int,
@departmentname varchar(40),
@tel1 varchar(30),
@tel2 varchar(30),
@fax varchar(30),
@ispublic bit,
@departmentid int OUTPUT,
@IsStepPass bit
AS
DECLARE @id int
select @id=departmentid from departments where parentdepartmentid=@parentdepartmentID and
departmentname=@departmentname
if @id is null
begin
insert into departments (parentdepartmentid,departmentname,tel1,tel2,fax,ispublic,IsStepPass)
values( @parentdepartmentID, @departmentname,@tel1, @tel2 ,@fax,@ispublic,@IsStepPass)
set @departmentid=@@identity
end
else
begin
set @departmentid=-1
end
GO
...全文
相关推荐
SQLServer存储过程转为oracle存储过程的工具
可以将SQL Server存储过程转为oracle存储过程的工具
oracle和mssql分页存储过程-均通用
综上所述,这个"oracle和mssql分页存储过程-均通用"的压缩包文件提供了一个跨平台的解决方案,帮助开发者在Oracle和MSSQL数据库中轻松实现高效的分页查询,同时提高了代码的可维护性和复用性
oracle到sqlserver存储过程语法转换
自定义函数与存储过程的创建** - **Oracle**: 创建函数或存储过程使用`CREATE OR REPLACE`关键字。
Sqlserver、Oracle、MySql、PostgreSql、SqlLite数据库差异
#### 三、存储过程支持- **Sqlserver**、**Oracle**、**MySql** 和 **PostgreSql** 支持存储过程。
oracle通过dblink链接 mysql和mssql例子
通过DBLink,用户可以查询远程数据库中的表,并执行远程数据库上的存储过程。但需要注意的是,DBLink通常是单向的连接。创建DBLink之前,必须保证以下几点:1.


