View Full Version : SQL query help...

Palmer ofShinra
28 Nov 2001, 11:19
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.

28 Nov 2001, 12:11
To delete all records:
DELETE FROM tableName;

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

Palmer ofShinra
29 Nov 2001, 12:14
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...