nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

MySQL deleting records sql command

This is a discussion on MySQL deleting records sql command within the Databases servers forums, part of the Mastering Servers category; Hi, I want to delete some records of date 29 May 2009 in mysql. What query'll i've to run???? Regards...


Go Back   nixCraft Linux Forum > Mastering Servers > Databases servers

Linux answers from nixCraft.


Databases servers Discussions of databases of all types - especially MySQL.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-12-2009, 11:05 PM
Senior Member
User
 
Join Date: Jul 2006
Posts: 145
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 4
asim.mcp is on a distinguished road
Default MySQL deleting records sql command

Hi,

I want to delete some records of date 29 May 2009 in mysql. What query'll i've to run????



Regards
Reply With Quote
  #2 (permalink)  
Old 06-12-2009, 11:42 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,697
Thanks: 11
Thanked 243 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Usually you run something as follows:
PHP Code:
DELETE FROM tablename WHERE field=condition
OR
PHP Code:
DELETE FROM tablename WHERE datef='Y-m-d'
See MySQL :: MySQL 5.0 Reference Manual :: 12.2.2 DELETE Syntax
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 06-14-2009, 02:13 AM
Senior Member
User
 
Join Date: Jul 2006
Posts: 145
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 4
asim.mcp is on a distinguished road
Default [solved]

Thanks, Problem solved
Reply With Quote
Reply

Tags
mysql , mysql delete date , mysql delete from syntax


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
On the risk of deleting folders or files in /tmp. nosnix Linux software 6 10-29-2008 01:22 PM
MySQL Rename Database SQL Command myfoot Databases servers 1 08-30-2008 05:54 PM
How to compare records in two tables in seperate My Sql database using perl script chandanperl Coding in General 2 08-27-2008 09:52 AM
Sorting individual records in a file based on some fields cucu81 Shell scripting 1 07-25-2006 03:08 AM
auto deleting folders if empty hinix Shell scripting 3 09-08-2005 05:02 PM


All times are GMT +5.5. The time now is 02:20 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38