PDA

View Full Version : SQL query help...


Palmer ofShinra
11-28-2001, 09:19 AM
OK... pretty simple actually...

What would be the query to delete rows completely in a table.

Both the query for selective deletions and to just wipe the table clean...

Basically, it's for a polling type system, but not the normal VB one.

And every so often we need to clear out all the votes and start fresh.

Admin
11-28-2001, 10:11 AM
To delete all records:
DELETE FROM tableName;

To delete only some records:
DELETE FROM tableName WHERE fieldName = 'value';

Palmer ofShinra
11-29-2001, 10:14 AM
Many thanks... I couldn't seem to find my way around the mySQL documentation... way too much to wade through.

I'm still a rank amatuer at this, but getting better daily...