var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: to insert multiple records in a table from already existig table
I want to insert multiple records in single command from emp whose dname=accounting into a table called emp2.
Thanks in advance
If 'emp' and 'emp2' are the same, the simplest way would then be
INSERT INTO emp2
SELECT * FROM emp
WHERE dname = 'ACCOUNTING';
If those tables don't have the same description, you'll have to include column list into the INSERT statement.
but the ename is in dept table
& ina trial I found the solution as:
insert into emp2
select emp.* from emp , dept
where emp.deptno =dept.deptno
and dept.dname = 'ACCOUNTING'
Although, Thanks for viewing