DavidSzczesniak
1/18/2018 - 4:23 PM

Insert a simple row into a table

\!h First, check columns for the desired table:
SHOW COLUMNS FROM artist;

+-------------+-------------+------+-----+---------+-------+
| Field       | Type        | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| artist_id   | smallint(5) | NO   | PRI | 0       |       |
| artist_name | char(128)   | YES  |     | NULL    |       |
+-------------+-------------+------+-----+---------+-------+

\!h Insert the row
INSERT INTO artist VALUES (7, "Barry Adamson"); 
-- 7 into artist_id and Barry Adamson into artist_name respectively, in that order - because that's the order the columns appear in the table