Jump to content


Photo

How do I mass delete entries with a certain value in a...


  • Please log in to reply
2 replies to this topic

#1 phpsqlprogrammer

phpsqlprogrammer
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 19 December 2003 - 05:14 PM

How do I mass delete entries with a certain value in a particular column?

Hi, thanks for answering in advance.

How do I mass delete all entries that has a value, say 123.123.com under the column \"remotehost\" in a table? Any SQL query that fits my description??

You see, this is a counter script and I am trying to remove all the counts that belong to me.

Thanks. :]

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 19 December 2003 - 05:37 PM

This code will delete the entries which belongs to \"123.123.com\"

delete from <table-name> where remotehost=\'123.123.com\'

Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#3 phpsqlprogrammer

phpsqlprogrammer
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 19 December 2003 - 05:49 PM

Thank you so much! Now, I do not have to manually delete them one by one! :)

Thanks, shivabharat!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users