

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
MySQL isn’t displaying right single quotation mark(’) after insertion of records
To display right single quotation marks, you need to alter the table with COLLATE='utf8_unicode_ci'.
Let us first create a table −
mysql> create table DemoTable2000 ( Name varchar(20) ); Query OK, 0 rows affected (0.81 sec)
Here is the query to use collate −
mysql> ALTER TABLE DemoTable2000 COLLATE='utf8_unicode_ci'; Query OK, 0 rows affected (0.90 sec) Records: 0 Duplicates: 0 Warnings: 0
Insert some records in the table using insert command −
mysql> insert into DemoTable2000 values('Chris’s Brown'); Query OK, 1 row affected (0.09 sec) mysql> insert into DemoTable2000 values('David’s Miller'); Query OK, 1 row affected (0.67 sec) mysql> insert into DemoTable2000 values('Robert’s Downey'); Query OK, 1 row affected (0.15 sec)
Display all records from the table using select statement −
mysql> select * from DemoTable2000;
This will produce the following output −
+-------------------+ | Name | +-------------------+ | Chris’s Brown | | David’s Miller | | Robert’s Downey | +-------------------+ 3 rows in set (0.00 sec)
- Related Questions & Answers
- Using single quotes around database and table name isn’t working in MySQL?
- Displaying only a list of records in ASC order with MySQL
- MySQL isn’t inserting binary data properly? Which datatype should be used?
- Why is JavaScript case sensitive but HTML isn't?
- Display records after a particular date in MySQL
- Format MySQL records (price values) after multiplying them
- MySQL update multiple records in a single query?
- MySQL query to get records after an interval of 8 months
- MySQL query to change a string by displaying only the part of string after underscore?
- Displaying T-code description and T-code field in Output ALV of report SM20 in SAP system
- Sorting a VARCHAR column as FLOAT using the CAST operator isn’t working in MySQL ?
- MySQL query to get the dates between range of records displaying student’s Date of Birth?
- Fetch ordered records after a specific limit in MySQL
- Kth smallest element after every insertion in C++
- What ingredient is added to make syrups of children sweet? Isn’t it harmful?
Advertisements