자격증/sqld

maria db 테이블 생성하기

딸기뚜왈기 2025. 2. 20. 17:43

테이블 생성하기 방법

 

 

방법1.

 

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| department         |
| information_schema |
| mysql              |
| performance_schema |
| study              |
| sys                |
| test01             |
+--------------------+
7 rows in set (0.001 sec)

MariaDB [(none)]> use department;
Database changed
MariaDB [department]> create table dpm (dpm_code int not null primary key, dpm_name varchar(20) not null, upper_dpm_code int null);
Query OK, 0 rows affected (0.029 sec)

 

 

방법 2.

 

https://kitty-geno.tistory.com/57