Results 1 to 2 of 2

Thread: How to insert data from one table to an empty table

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Answers
    1

    How to insert data from one table to an empty table

    How will you create one table (target table) from another table (source table). The target table should be empty after creation.
    How to insert data from one table to an empty table


  2. #2
    Junior Member
    Join Date
    Oct 2006
    Answers
    1

    Re: How to insert data from one table to an empty table

    try this

    create table targetTableName [(columnname,columnname)] as select columnname,columnname from sourcetablename where 1 = 2

    this will create a target table without taking any record.

    Now to enter data from one table to another
    insert into newtablename select columnname,columnname from oldtablename



    Quote Originally Posted by sahanai mishra View Post
    How will you create one table (target table) from another table (source table). The target table should be empty after creation.
    How to insert data from one table to an empty table



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact