Home All Groups Group Topic Archive Search About
Author
23 Sep 2005 10:26 AM
balakarthik
hi all,

IF i had one table. in that table three records are there.all there have
same datas.there is no primary key.how i can delete the second row in that
table

regards
bala

Author
23 Sep 2005 10:37 AM
Herbert
Hi,

How can u say which is the second row?

U want to delete duplicate and want only one row?

Reply
--
Herbert


Show quote
"balakarthik" wrote:

> hi all,
>
> IF i had one table. in that table three records are there.all there have
> same datas.there is no primary key.how i can delete the second row in that
> table
>
> regards
> bala
Author
23 Sep 2005 10:38 AM
Jose G. de Jesus Jr MCP, MCDBA
hello there
try this


use northwind
select p.supplierid, p.unitprice,p.productid from products p
join
(
select supplierid, min(unitprice)as unitprice from products
group by supplierid
) as p2
on p.supplierid=p2.supplierid
and p.unitprice=p2.unitprice


hope it helps

--
thanks,

------------------------------------
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787


Show quote
"balakarthik" wrote:

> hi all,
>
> IF i had one table. in that table three records are there.all there have
> same datas.there is no primary key.how i can delete the second row in that
> table
>
> regards
> bala
Author
23 Sep 2005 10:39 AM
Jose G. de Jesus Jr MCP, MCDBA
sorry wrong post
--
thanks,

------------------------------------
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787


Show quote
"balakarthik" wrote:

> hi all,
>
> IF i had one table. in that table three records are there.all there have
> same datas.there is no primary key.how i can delete the second row in that
> table
>
> regards
> bala
Author
23 Sep 2005 11:15 AM
R.D
bala
what do you mean by second row? rows not stored in an order in RDBMS.
CELKO is not going to leave you !!!!!
post ddl/sample data.
Regards
R.D

Show quote
"Jose G. de Jesus Jr MCP, MCDBA" wrote:

> sorry wrong post
> --
> thanks,
>
> ------------------------------------
> Jose de Jesus Jr. Mcp,Mcdba
> Data Architect
> Sykes Asia (Manila philippines)
> MCP #2324787
>
>
> "balakarthik" wrote:
>
> > hi all,
> >
> > IF i had one table. in that table three records are there.all there have
> > same datas.there is no primary key.how i can delete the second row in that
> > table
> >
> > regards
> > bala
Author
23 Sep 2005 1:44 PM
Yosh
You've haven't seen the rath of Hurricane Celko!

Show quote
"balakarthik" <balakart***@discussions.microsoft.com> wrote in message
news:F742D9A8-CAC8-4501-B4C3-1374E68FCD83@microsoft.com...
> hi all,
>
> IF i had one table. in that table three records are there.all there have
> same datas.there is no primary key.how i can delete the second row in that
> table
>
> regards
> bala
Author
23 Sep 2005 7:02 PM
--CELKO--
Show quote
>> You've haven't seen the wrath of Hurricane Celko! <<
LOL!!
Author
23 Sep 2005 3:28 PM
Trey Walpole
the best way is to create the table again - correctly [with primary key]
- and insert the distinct values into it from the old table. The new
table will of course have to have a different name.

balakarthik wrote:

Show quote
>hi all,
>
>IF i had one table. in that table three records are there.all there have
>same datas.there is no primary key.how i can delete the second row in that
>table
>
>regards
>bala

>

AddThis Social Bookmark Button