GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • DOCUMENTATION
  • Tutorials
  • Developer
  • SQL Reference
  • Integrations
  • Releases
  • SQL Commands
  • SQL Functions
  • Numeric Functions
  • String Functions
  • Date & Time Functions
  • Aggregate Functions
  • Conversion Functions
  • BUILD_BITMAP

This view

  • Original page
  • New address

GeezerVison is showing docs.databend.com — TO_HEX | Databend

For a string argument str, TO_HEX() returns a hexadecimal string representation of str where each byte of each character in str is converted to two hexadecimal digits. The inverse of this operation is performed by the UNHEX() function.

For a numeric argument N, TO_HEX() returns a hexadecimal string representation of the value of N treated as a longlong (BIGINT) number.

Syntax​

TO_HEX(<expr>)

Aliases​

  • HEX

Examples​

SELECT HEX('abc'), TO_HEX('abc');

┌────────────────────────────┐
│ hex('abc') │ to_hex('abc') │
├────────────┼───────────────┤
│ 616263 │ 616263 │
└────────────────────────────┘

SELECT HEX(255), TO_HEX(255);

┌────────────────────────┐
│ hex(255) │ to_hex(255) │
├──────────┼─────────────┤
│ ff │ ff │
└────────────────────────┘
Did this page help you?
Yes
FeedBack
Raise issue
Join our growing community
GitHub
🌟 9.5K Stars
Slack
X(Twitter)
YouTube
Or simply contact us directly
Contact Us
Explore Databend Cloud
  • Syntax
  • Aliases
  • Examples
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.