Last active
August 29, 2015 14:13
-
-
Save Ke-/78553fef97e0ac3f9364 to your computer and use it in GitHub Desktop.
Byte example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local(data) = bytes('Hello') | |
| my_ds->sql(" | |
| DROP TABLE IF EXISTS bytes_example; | |
| CREATE TABLE bytes_example ( | |
| `data` binary(16) NOT NULL | |
| ); | |
| INSERT INTO bytes_example(data) VALUES (X'" +#data->encodehex + "'); | |
| // or | |
| // INSERT INTO bytes_example(data) VALUES (0x" +#data->encodehex + "); | |
| ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment