Home Tutorial Php Sql MySQL ASCII

 
 

Share on Google+Share on Google+
MySQL ASCII
Posted on: December 9, 2010 at 12:00 AM
Advertisement
This example illustrates how to use the ASCII character set.

MySQL ASCII

This example illustrates how to use the ASCII character set.

The ASCII Returns the numeric value of the leftmost character of the string. It returns 0 if str is the empty string. Returns NULL if str is NULL. ASCII() works for 8-bit characters.

Query

SELECT ASCII('5');

Output

+------------+
| ASCII('5') |
+------------+
| 53         |
+------------+

Query

SELECT ASCII(2);

+----------+
| ASCII(2) |
+----------+
| 50       |
+----------+

Query

+------------------+
| ASCII('sandeep') |
+------------------+
| 115              |
+------------------+

Query

+-------------+
| ASCII('dx') |
+-------------+
| 100         |
+-------------+
Advertisement

Related Tags for MySQL ASCII:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 9, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com