Log in

View Full Version : Store other mysql table data into another table.



udaybabu
12-29-2014, 07:12 AM
HI,

I have a "registration" new table with some fields like Guid, ClientGuid, RegistrationDate, DeregistartionDate, Status, Created and LastUpdate.

I have another table with almost 5000 records and the table name is "Client" with so many fields including Guid, RegistrationDate, DeregistartionDate.

Now i want to put Guid, RegistrationDate, DeregistartionDate data from client table and put this date in "registration" table.

i wrote a queary like this but its not working.. it says #1062 - Duplicate entry '' for key 'PRIMARY'

INSERT INTO `registration` (`ClientGuid`, `RegistrationDate`,`DeregistrationDate`)
SELECT `Guid`, `RegistrationDate`, `DeregistrationDate` FROM `Client`;

Thanks in advance..

kiran

joilben
07-27-2020, 07:52 AM
Open SQL Server Management Studio.

Right-click on the database name, at that point select "Assignments" > "Fare data..." from the item pioneer.

The SQL Server Import/Export wizard opens; click on "Next".

Give verification and select the source from which you need to duplicate the information; click "Next".