This forum consists of only people that work for TechWyse and contribute to the WyseLabs community. We invite all of you to read many of the helpful things that we find in our daily lives! That is why we have built this section after all!
Programming for Search Engines 101. An area for avid PHP and .NET developers to chat about Programming techniques and how to make better use of search engines.
Moderator: Moderators
by douglas » Thu Apr 11, 2013 12:26 am
We can duplicate records in our MySQL table using SELECT COUNT(*) FROM YOUR_TABLE;
INSERT INTO YOUR_TABLE
SELECT *
FROM YOUR_TABLE
WHERE COUNT =(SELECT COUNT(*)
FROM YOUR_TABLE);
Duplicate record is only possible if your table has no primary key as primary key will not allow duplicates otherwise its ok to duplicate record.
-
douglas
-
- Posts: 282
- Joined: Fri Feb 20, 2009 3:56 am
by silvester » Thu Apr 11, 2013 2:11 am
This type of SQL statement is helpful when we are fetching entire row from one table and inserting to another for ex:-in e-commerce projects. Need to make sure that the fields in both table are same.
-
silvester
-
- Posts: 89
- Joined: Mon Nov 10, 2008 12:59 am
Return to Programming
Who is online
Users browsing this forum: No registered users and 4 guests