So I'm working on this Django project, with MySQL as DB engine.
I made some sort of mistake, and now I have to drop a table I accidentally created. So I'm trying to access the DB through command line, but cannot figure out how.
Could anyone help? Or is there a better way of dropping a table in MySQL DB?
Thanks in advance.
Asked
Active
Viewed 904 times
0

Ryan
- 199
- 1
- 9
2 Answers
0
Use the dbshell command
python manage.py dbshell
then while in the shell, depending on what database you are using, you type the command to show tables to identify the table you want to drop.
still in the shell, you can use SQL command to drop the table
DROP TABLE shop_brand;

M.S_A
- 26
- 3