How do I clear a mysql database?



How do I clear a mysql database?..

Answer / Kumar Abhinav

To clear or delete all data from a MySQL database, you can use the TRUNCATE TABLE command. Here's an example:

```sql
USE <database_name>;
TRUNCATE <table_name>;
```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

What is the difference between unix timestamp and mysql timestamp?

1 Answers  


Can we store videos in mysql database?

1 Answers  


How to create a new table in mysql?

1 Answers  


if we want to load data from a text file into a mysql table, but the columns in table are 1st: code(int) and 2nd: city(varchar), but in text file the format is 1st cityname and then code separeted by delimeters. how to load?

2 Answers  


What is the difference between a Table and a View?

3 Answers  


Why do you think it is advised to not to use guid and character columns as clustered index arrays?

1 Answers  


What are the advantages of mysql in comparison to oracle?

1 Answers  


How to set the time zone for MySQL to particular country time?

1 Answers  


Can python connect to mysql?

1 Answers  


What are the objects can be created using CREATE statement?

1 Answers  


Can you tell how many values can set the function of mysql to consider?

1 Answers  


How to dump a table from a database.

1 Answers  


Categories