SQL | database, table 作成&削除・データ確認
code:sql
-- database, table の確認
show databases;
show tables;
-- database の作成
create database art_data;
-- table の作成
use artdata;
CREATE TABLE artist(id int not null auto_increment primary key, name varchar(255) not null, category varchar(255))
-- table情報の閲覧 2種類
show columns from artist;
describe artist;
-- table の削除
drop table artist;
-- database の削除
drop database art_data;
参考: Udemy (データベースの追加)