table 생성
- table을 생성한다. column이 하나라도 있어야 생성되므로 column도 하나 만들어준다.
create table tabel명 ( column명 VARCHAR(100) );
- table 확인
show tab;
table 삭제
- table 삭제
drop table table명;
table 이름 변경
- 이름 변경
rename table table명 to 변경할table명;
table 복사
- 테이블 스키마 복사
create table new_table명 like old_table명 ;
- 테이블 스키마 & 데이터 복사
create table new_table명 (select * from old_table명);
- 데이터 복사
insert into receive_table명 (select * from serve_table명);
참고
'DB > MariaDB' 카테고리의 다른 글
[MariaDB] 6. data 추가, 삭제, 수정 (0) | 2022.12.20 |
---|---|
[MariaDB] 5. column 추가, 삭제, 변경 (0) | 2022.12.20 |
[MariaDB] 3. 데이터베이스 생성 및 관리 (0) | 2022.12.20 |
[MariaDB] 2. user 사용자 생성 및 삭제, 권한 부여 (0) | 2022.12.20 |
[MariaDB] 1. MariaDB 설치와 로그인(Mac) (0) | 2022.12.20 |
댓글