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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 428
    Comment on it

    Temporary table is used to store the temporary record which can be reused in a single session. Temporary tables are created from the existing tables and these tables are drops once the session ends or connection is terminated but you can also use DROP TABLE statement to drop a temporary table. Temporary tables can only be accessed by the client who has created the table. That is, different clients can create same name temporary table but in different sessions. Temporary table can have the same name as an existing table. That is, whenever you issue a request to a existing table it will refer to the temporary table. Once you drop the temporary table you can the access the existing table. Temporary Tables are created using CREATE TEMPORARY TABLE statement.

    Creating Temporary Tables:

    Syntax:

    1. CREATE TEMPORARY TABLE temp_tblname
    2. SELECT statements.

    Example:

    1. Create temporary table temp_emp
    2. select name, dob from employees

    Dropping Temporary Tables:

    Syntax:

    1. DROP TEMPORARY TABLE temp_tblname

    Example:

    1. DROP TEMPORARY TABLE temp_emp

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Reset Password
Fill out the form below and reset your password: