How to make use of SQL (Oracle) to count the size of a string? How to make use of SQL (Oracle) to count the size of a string? oracle oracle

How to make use of SQL (Oracle) to count the size of a string?


You can use LENGTH() for CHAR / VARCHAR2 and DBMS_LOB.GETLENGTH() for CLOB. Both functions will count actual characters (not bytes).

See the linked documentation if you do need bytes.


you need length() function

select length(customer_name) from ar.ra_customers