MySQL

MySQL.1 Database 및 Table 삭제하기

codermun 2020. 12. 3. 10:58
728x90
반응형

MySQL

Database 삭제하기

mysql>drop database database_name;

 

Table 삭제하기

특정 Row 삭제 -> delete

모든 Row 삭제 -> truncate

1. table 삭제

mysql>drop table table_name;

 

2. table 안의 모든 Row 삭제

mysql>truncate table_name;

 

3. table 안의 특정 Row 삭제

mysql>delete from table_name where id=10;

 

4. table 여러 Row 삭제

mysql> delete from users where id between 3 and 7;

728x90
반응형