So I tried to experiment with the INSERT INTO code. I tried using the statement,
INSERT INTO cats (name, age)
VALUES ( 8, '3');
just to try it out and see what happens. It turns out it's still able to store both values. Under name, was 8, and under age was 3. I also tried to insert the name, Momo, without any quotes but it did not work. How come the number 8, worked without the ' ' and Momo didn't'? Also, how come when I use ' ' for the integer, 3, it still took that value as age?
Last part of the question that I just want to clarify. I tried inserting 'Mimi' in the age value and the table showed 0. I just assumed that meant a null value because 'Mimi' isn't an integer. Is that correct? If so, then why did '3' work?
For more clarification, my cats table looks like this
mysql> SHOW COLUMNS FROM cats;
+-------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| name | varchar(100) | YES | | NULL | |
| age | int(11) | YES | | NULL | |
+-------+--------------+------+-----+---------+-------+
I'm a true beginner so I'm sorry for the very simple question