IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_update_role_menu_order]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_update_role_menu_order]
GO
CREATE proc [dbo].[mps_update_role_menu_order]
(
    @menucmpid int ,
    @menuid int ,
    @menuorder int 
)
as
begin
    set nocount on
    
    update mps_menu set 
        mn_order = @menuorder 
    where mn_cmpid = @menucmpid 
    and mn_id = @menuid
    
    set nocount off
end