MySQL OCT Function

MySQL OCT is one of the String functions which converts the given value to an Octal number. The OCT function returns the string representation of that Octal number. The basic syntax of the OCT Function is as shown below:

SELECT OCT(N)

MySQL Octal Function Example

This method query converts the user-specified number to Octal Number. Next, it returns the Output in String format. The following String method query shows you multiple ways to use this OCT function.

SELECT OCT(10);

SELECT OCT(225);

SELECT OCT(33456);
OCT Example