Mega Code Archive

 
Categories / MySQL Tutorial / Insert Update Delete
 

Insert single quotation mark by using the double quote

mysql> mysql> CREATE TABLE Employee(     ->     id            int,     ->     first_name    VARCHAR(15),     ->     last_name     VARCHAR(15),     ->     start_date    DATE,     ->     end_date      DATE,     ->     salary        FLOAT(8,2),     ->     city          VARCHAR(10),     ->     description   VARCHAR(15)     -> ); Query OK, 0 rows affected (0.03 sec) mysql> mysql> select * from Employee; Empty set (0.00 sec) mysql> mysql> Insert into employee (first_name)value("Keith's"); Query OK, 1 row affected (0.00 sec) mysql> mysql> select * from Employee; +------+------------+-----------+------------+----------+--------+------+-------------+ | id   | first_name | last_name | start_date | end_date | salary | city | description | +------+------------+-----------+------------+----------+--------+------+-------------+ | NULL | Keith's    | NULL      | NULL       | NULL     |   NULL | NULL | NULL        | +------+------------+-----------+------------+----------+--------+------+-------------+ 1 row in set (0.00 sec) mysql> mysql> drop table Employee; Query OK, 0 rows affected (0.00 sec) mysql>