Inserting values

Results 1 to 2 of 2

Thread: Inserting values

  1. #1
    Join Date
    Dec 1969

    Default Inserting values

    I have 2 SQL tables<BR><BR>Emp1(Emp_id,EMP_name,Emp_city)<BR>Te mp_Emp1(Emp_id,EMP_name,Emp_city,noc)<BR><BR>I need to insert data from emp1 to temp_emp1. when the column noc wasn&#039;t there I used to do like this<BR>insert into temp_emp1 select * from emp1<BR><BR>how to do this..<BR><BR>pls help

  2. #2
    Join Date
    Dec 1969

    Default RE: Inserting values

    INSERT INTO temp_emp1 <BR> SELECT *,NULL FROM emp1<BR><BR>assuming noc allows NULLs, otherwise pass another default value for noc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts