Quote:
hi , i am new to posgresql will you help me how to convert this ms-sql store procedure to postgresql
thanks
|
Code:
ALTER PROCEDURE [dbo].[sp_InsertUserData]
@DataLabel varchar(50)=' ', // taking input from user
@DataDescription varchar(500)=' ', taking input from user
@UserDataDetailId varchar(500) output
AS
BEGIN
begin try
begin transaction
INSERT INTO UserDataDetails ( DataLabel, DataDescription)
values (@DataLabel, @DataDescription)
set @UserDataDetailId = SCOPE_IDENTITY();
commit transaction
end try
begin catch
rollback transaction;
print error_message()
end catch
END