+--------------------+ | Database | +--------------------+ | ajc | | db_pegawai | | information_schema | | movieindustry031 | | mysql | | performance_schema | | phpmyadmin | | renko | | test | | tugas_renko | | university | +--------------------+ 11 rows in set (0.00 sec)
MariaDB [(none)]> Use MovieIndsutry031;
ERROR 1049 (42000): Unknown database 'movieindsutry031' MariaDB [(none)]> Use MovieIndustry031; Database changed MariaDB [MovieIndustry031]> create table Studio( -> name varchar (30) not null primary key, -> address varchar (50) not null, -> pres varchar (30) not null); Query OK, 0 rows affected (0.88 sec)
MariaDB [MovieIndustry031]> show tables;
+----------------------------+ | Tables_in_movieindustry031 | +----------------------------+ | studio | +----------------------------+ 1 row in set (0.00 sec)
MariaDB [MovieIndustry031]> desc studio;
+---------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+-------------+------+-----+---------+-------+ | name | varchar(30) | NO | PRI | NULL | | | address | varchar(50) | NO | | NULL | | | pres | varchar(30) | NO | | NULL | | +---------+-------------+------+-----+---------+-------+ 3 rows in set (0.02 sec)
MariaDB [MovieIndustry031]> create table Movie(
-> title varchar (30) not null, -> year numeric (4) not null, -> length numeric (3) not null, -> inColor char (1) not null, -> studioName varchar (30) not null, -> primary key (title,year)); Query OK, 0 rows affected (0.25 sec)
MariaDB [MovieIndustry031]> show tables;
+----------------------------+ | Tables_in_movieindustry031 | +----------------------------+ | movie | | studio | +----------------------------+ 2 rows in set (0.00 sec)
MariaDB [MovieIndustry031]> desc Movie;
+------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------+--------------+------+-----+---------+-------+ | title | varchar(30) | NO | PRI | NULL | | | year | decimal(4,0) | NO | PRI | NULL | | | length | decimal(3,0) | NO | | NULL | | | inColor | char(1) | NO | | NULL | | | studioName | varchar(30) | NO | | NULL | | +------------+--------------+------+-----+---------+-------+ 5 rows in set (0.02 sec)