Blog

Newest Post
Blog Archives
Blog Categories

Portfolio

3D Models
Banners
Brochures
Business Cards
Custom Programming
Environments
Flash Projects
Game Design
Image Altering
Web Design

About

Resume
Recommendation Letters

Contact

November 3, 2009

MySQL DELETE with a Max() Subquery

Filed under: The Coding World — admin @ 4:50 pm

Here is another nifty way to use a Subquery when deleting a record from your MySQL table.

View Code MYSQL
DELETE FROM table1 WHERE id = '1' && saleid='345' 
	                  && slot = (SELECT MAX(slot) FROM table1)

Leave a Reply

© - Digital Epiphany Designs, Online Portfolio for Web Design, Custom Programming, Grapic Design and Game Design.