
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
Query MySQL with unicode char code?
Let us first create a table −
mysql> create table DemoTable -> ( -> Value int -> ); Query OK, 0 rows affected (0.57 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(0x41); Query OK, 1 row affected (0.12 sec) mysql> insert into DemoTable values(0x30); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable values(0x61); Query OK, 1 row affected (0.27 sec)
Display all records from the table using select statement −
mysql> select *from DemoTable;
Output
This will produce the following output −
+-------+ | Value | +-------+ | 65 | | 48 | | 97 | +-------+ 3 rows in set (0.00 sec)
Following is the query to work with unicode char code −
mysql> select char(Value) from DemoTable;
Output
This will produce the following output −
+-------------+ | char(Value) | +-------------+ | A | | 0 | | a | +-------------+ 3 rows in set (0.00 sec)
- Related Articles
- Store unicode in a char variable in Java
- MySQL: Testing connection with query?
- MySQL Sum Query with IF Condition?
- MySQL select query with multiple WHERE?
- MySQL query with OR & AND conditions
- MySQL LIKE query with dynamic array?
- PHP – How to return character by Unicode code point value using mb_chr()?
- Java Program to Determine the Unicode Code Point at a given index
- Insert NULL value into database field with char(2) as type in MySQL?
- MySQL query to insert row with date?
- MySQL query to search record with apostrophe?
- Select query with regular expression in MySQL
- Insert with a Select query in MySQL
- What is the use of MySQL CHAR() function?
- MySQL query for alphabetical search (ABC) with REGEXP?

Advertisements