Jump to content

Erase everything in a table

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
Paradine

Paradine

    Learning Programmer

  • Members
  • PipPipPip
  • 48 posts
I can't remember how to erase everything in a table. Anyone know real quick?

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
DELETE FROM table_name
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Or you could use

TRUNCATE [TABLE] tbl_name

as well


#4
Paradine

Paradine

    Learning Programmer

  • Members
  • PipPipPip
  • 48 posts
That works, thank you!

How do I delete all of the tables from a database now?

#5
Jimbo

Jimbo

    Programmer

  • Members
  • PipPipPipPip
  • 121 posts
Not 100% but I think its 'DROP tablename'

#6
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts

Jimbo said:

Not 100% but I think its 'DROP tablename'

That is correct.