+------+-----------+----------+ | s_id | s_name | course | +------+-----------+----------+ | 10 | Alex | NULL | | 11 | Tony | NULL | | 12 | Drake | NULL | | 13 | merlin | python | | 14 | John | excel | | 15 | Johnathan | Power BI | | 16 | Sam | Tableau | | 17 | Harry | MYSQL | +------+-----------+----------+ 8 rows in set (0.00 sec)
mysql> insert into student (18,'Marry',NULL);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '18,'Marry',NULL)' at line 1 mysql> insert into student values (18,'Marry',NULL); Query OK, 1 row affected (0.01 sec)
mysql> select * from student;
+------+-----------+----------+ | s_id | s_name | course | +------+-----------+----------+ | 10 | Alex | NULL | | 11 | Tony | NULL | | 12 | Drake | NULL | | 13 | merlin | python | | 14 | John | excel | | 15 | Johnathan | Power BI | | 16 | Sam | Tableau | | 17 | Harry | MYSQL | | 18 | Marry | NULL | +------+-----------+----------+ 9 rows in set (0.00 sec)
mysql> insert into student (s_id,course) values (19,'Python');
Query OK, 1 row affected (0.01 sec)
mysql> select * from student;
+------+-----------+----------+ | s_id | s_name | course | +------+-----------+----------+ | 10 | Alex | NULL | | 11 | Tony | NULL | | 12 | Drake | NULL | | 13 | merlin | python | | 14 | John | excel | | 15 | Johnathan | Power BI | | 16 | Sam | Tableau | | 17 | Harry | MYSQL | | 18 | Marry | NULL | | 19 | NULL | Python | +------+-----------+----------+ 10 rows in set (0.00 sec)
mysql> update student set s_name = "Lara" where s_id = 11;