(866) 366-3640 - support@sagonet.com
Sago Logo
Banner

   
Log in / create account Page Discussion History Go to the site toolbox
CLI: Creating a mySQL Table

From the command line run the command mysql:

mysql> select database(); +------------+ | database() | +------------+ | ercc14 | +------------+ 1 row in set (0.00 sec)

mysql> show tables; Empty set (0.00 sec)

mysql> create table testing ( word varchar(20) ); Query OK, 0 rows affected (0.01 sec)

mysql> show tables; +------------------+ | Tables_in_ercc14 | +------------------+ | testing | +------------------+ 1 row in set (0.01 sec)

mysql> describe testing; +-------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+-------+ | word | varchar(20) | YES | | NULL | | +-------+-------------+------+-----+---------+-------+ 1 row in set (0.01 sec)

mysql> insert into testing

           values ('test1'), ('test2');

Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0

mysql> select * from testing; +-------+ | word | +-------+ | test1 | | test2 | +-------+ 2 rows in set (0.00 sec)

mysql> exit Bye