IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[sys_sql_getUniqNum]') AND type = 'P')
DROP PROCEDURE [dbo].[sys_sql_getUniqNum]
GO
create procedure [dbo].[sys_sql_getUniqNum] @val bigint,@uni_num bigint output
as
begin
insert into sys_uninum(uni_val) values(@val)
set @uni_num = @@identity
end