View Full Version : Query Question
ChrisBaktis
03-25-2005, 02:18 PM
What query can I run to clean out all my members User Notes. I was using this for one thing and am now going to use for something else and need all the info cleared.
Chris
Marco van Herwaarden
03-25-2005, 02:21 PM
DELETE FROM usernote
If you are using a table prefix, then add this in front of 'usernote'.
ChrisBaktis
03-25-2005, 02:49 PM
Thank you - worked great!
Can I bother you for one last answer on this post from before.
https://vborg.vbsupport.ru/showthread.php?t=78471
filburt1
03-25-2005, 02:50 PM
I believe
TRUNCATE usernote
...will also work, and possibly a great deal faster. However, that doesn't really matter if you're doing it just once.
ChrisBaktis
03-25-2005, 02:52 PM
Thanks filburt - this is just a one time deal - but to repeat asking questions I always write this stuff down so I dont have to bother people again -
Thanks
Oblivion Knight
03-25-2005, 03:07 PM
I believe
TRUNCATE usernote
...will also work, and possibly a great deal faster. However, that doesn't really matter if you're doing it just once.Actually, I think it's
TRUNCATE TABLE usernote;)
Marco van Herwaarden
03-25-2005, 07:30 PM
I think you are allowed to ommit the TABLE in the TRUNCATE statement, so both should be correct.
The difference between TRUNCATE and DELETE is that DELETE is deleting each row in the table seperate (slow but with respect to foreign key and other constraints), where TRUNCATE just reset the last row pointer (data is still there but there is no pointer to it anymore, is faster)
ChrisBaktis
03-25-2005, 11:18 PM
Thanks for all the help everyone!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.