

- 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
What is MySQL OCTET_LENGTH() function?
MySQL OCTET_LENGTH() function is used to count the number of characters in a string. Basically, it is a synonym of LENGTH() function. Its syntax is as follows −
Syntax
OCTET_LENGTH(Str)
Here, Str is a string whose length of characters has to be returned.
Example
mysql> Select OCTET_LENGTH('My name is Ram')As Str_Length; +------------+ | Str_Length | +------------+ | 14 | +------------+ 1 row in set (0.00 sec)
- Related Questions & Answers
- What is the difference between MySQL LENGTH() and CHAR_LENGTH() function?
- What is Octet class in JavaTuples?
- Which function is a synonym of MySQL LENGTH() function?
- How MySQL LENGTH() function measures the string length?
- What is MySQL ELT() function?
- What is MySQL MAKE_SET() function?
- What is MySQL INTERVAL() function?
- What is the maximum length of MySQL VARCHAR column?
- What is the maximum length of a table name in MySQL?
- What is MySQL HEX() function and how it is different from CONV() function?
- What is the use of MySQL FROM_UNIXTIME() function?
- What is the use of MySQL GET_FORMAT() function?
- What is the use of MySQL LAST_INSERT_ID() function?
- What is the use of MySQL CONCAT_WS() function?
- What is the use of MySQL TRUNCATE() function?
Advertisements