List Info

Thread: Sql problem




Sql problem
country flaguser name
United States
2007-06-22 04:23:22
Hi all,
Plz solve my problem

"How we can delete duplicate records remaining original
one????"

means if i have more than one duplicate records in my
database then
how can i delete them but i want to keep distinct of them.

in all of these i want one command line only (may include
subquery
also) in mysql

plz ans me back its my humble request !!!!!

thanks


--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---


Re: Sql problem
country flaguser name
United States
2007-06-22 06:28:37
hi aajhon

you cannot delete particular rows from a group of identical
records if
you can not distinguish them. so you have to create an
additional
auto_increment-ed primary key field in your datafile. this
way you can
say to mysql "from a group of identical records (not
including PK
field) please delete all records with PK greater than the
minimal PK
of a group".

--
free web developer tools:
  http://osbtools.goog
lepages.com/


On Jun 22, 11:23 am, aajhon <ajayshukla...gmail.com> wrote:
> Hi all,
> Plz solve my problem
>
> "How we can delete duplicate records remaining
original one????"
>
> means if i have more than one duplicate records in my
database then
> how can i delete them but i want to keep distinct of
them.
>
> in all of these i want one command line only (may
include subquery
> also) in mysql
>
> plz ans me back its my humble request !!!!!
>
> thanks


--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.

For information or project assistance please visit :
http://www.360psg.com

You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHPgooglegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribegooglegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )