To include quote characters within a string : String : Data Types MySQL TUTORIALS


MySQL TUTORIALS » Data Types » String »

 

To include quote characters within a string


A ' inside a string quoted with ' may be written as ''.

mysql>
mysql> CREATE TABLE employee (
    ->      name CHAR(30NOT NULL
    -> );
Query OK, rows affected (0.02 sec)

mysql>
mysql> INSERT INTO employee (nameVALUES ('''A');
Query OK, row affected (0.03 sec)

mysql>
mysql> SELECT FROM employee;
+------+
| name |
+------+
'A   |
+------+
row in set (0.00 sec)

mysql>
mysql> drop table employee;
Query OK, rows affected (0.00 sec)

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Data Types
» String