vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Query Question (https://vborg.vbsupport.ru/showthread.php?t=78757)

ChrisBaktis 03-25-2005 02:18 PM

Query Question
 
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

[sql]DELETE FROM usernote[/sql]
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
[sql]
TRUNCATE usernote
[/sql]
...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

Quote:

Originally Posted by filburt1
I believe
[sql]
TRUNCATE usernote
[/sql]
...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
[sql]TRUNCATE TABLE usernote[/sql];)

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!


All times are GMT. The time now is 10:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01124 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete