You are here: Re: delete particular rows in a table « MsSQL Server « IT news, forums, messages
Re: delete particular rows in a table

Posted by Greg D. Moore \(Strider\) on 07/28/06 03:00

"NiTiN" <emailme.nitin@gmail.com> wrote in message
news:1153973464.918563.319090@m79g2000cwm.googlegroups.com...
> > You are assuming that the rows will be returned in a particular order
which
> > w/o a ORDER BY statement is not guaranteed.
>
> True, but unless there are updations and insertions occuring, the order
> of the rows is usually the same as that provided by a SELECT statement
> (perhaps a statistics update would cause a new execution plan to
> provide rows in a different order).

USUALLY but by no means always.

The posted code is absolutely unsafe.


>
> When you've got duplicate entries and you don't care which ones get
> deleted, you could use a modified version of the example to delete all
> but one.

You could if you want to risk losing good data.

There are far better ways of doing this.


>
> N.I.T.I.N.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация