Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Temporary Tavles in SQL

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 287
    Comment on it

    Temporary tables in SQL are used for manipulation of data for a short period of time.


    It can be used as a accumulator like we have in microprocessor which acts as mediator to store and perform operations into it.


    Temporary table in SQL are mainly of two types:


    LOCAL TEMPORARY TABLES


    GLOBAL TEMPORARY TABLES


    Local Temporary Tables have scope within the window in which it is created and used


    For ex :
    DECLARE LOCAL TEMPORARY TABLE studentdetails
    ( id int NOT NULL,
      name varchar(50) ,
      contact varchar(50)
    );
    


    Global temporary table can be used outside the query window where is it has been created.


    For ex:
    CREATE GLOBAL TEMPORARY TABLE suppliers
    ( supplierid int  NOT NULL,
      suppliername varchar(50),
      contactname varchar(50)
    );
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: