
- 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
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 Articles
- What is the difference between MySQL LENGTH() and CHAR_LENGTH() function?
- Which function is a synonym of MySQL LENGTH() function?
- What is an octet? Why would atoms want to complete their octet?
- What is Octet class in JavaTuples?
- 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 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?
- What is the use of MySQL SUBSTRING_INDEX() function?

Advertisements