You must Sign In to post a response.
  • Category: [Competition Entries]

    Local/Temporarily procedure within procedure

    Hi,i want to create Temporarily Stored Procedure with stored procedure,
    can any one tell pls,how to create local/temporariry procedure within procedure pls
  • #710862
    Hi,
    Temporary stored procedures on Microsoft SQL Server are prefixed with a pound sign #. One pound sign means that its temporary within the session, two pound signs ## means its a global temporary procedure, which can be called by any connection to the SQL server during its lifetime.

    SET NOCOUNT ON
    GO
    CREATE PROC #tempProc
    @id integer
    @name varchar(100)
    AS
    INSERT INTO table1(empid,empname) VALUES (@id,@name)
    GO
    EXEC #tempProc1 10,Mohan
    GO

    SET NOCOUNT OFF
    GO

    Regards,
    Kalandiyur Subramanian Mohan
    www.mohanks.com


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.