Last answered:

16 Dec 2021

Posted on:

25 Nov 2021

0

Why has each record in the department _dup table been repeated three times?????

help, please!!!
image.png

1 answers ( 0 marked as helpful)
Instructor
Posted on:

16 Dec 2021

0

Hi Asmaa!

It seems that you have run the query for the insertion of the records three times. Thus, you have every record three times in your table. You can drop it and then create it again and insert the records.

CREATE TABLE departments_dup
(
dept_no CHAR(4) NULL,
dept_name VARCHAR(40) NULL
);
INSERT INTO departments_dup
(
dept_no,
dept_name
)
SELECT
*
FROM
departments;

Hope this helps.
Best,
Tsvetelin

Submit an answer