29 lines
572 B
MySQL
29 lines
572 B
MySQL
|
-- Active: 1697184303960@@127.0.0.1@3306
|
||
|
|
||
|
# Date: 13.10.2023
|
||
|
# Author: Sven Vogel
|
||
|
|
||
|
# ---------------------------------------------
|
||
|
# setup database schema
|
||
|
CREATE SCHEMA IF NOT EXISTS task01;
|
||
|
USE task01;
|
||
|
|
||
|
# select a single number
|
||
|
SELECT 5 AS number;
|
||
|
# interpret value as hex
|
||
|
SELECT hex(255) AS hexnum;
|
||
|
|
||
|
# intger encode of ascii '5'
|
||
|
SELECT ASCII('5');
|
||
|
SELECT BIN(65);
|
||
|
# binary value of 'A'
|
||
|
SELECT BIN(ASCII('A'));
|
||
|
# binary encode of 'Mucke'
|
||
|
SELECT CONCAT_WS(
|
||
|
' ',
|
||
|
BIN(ASCII('M')),
|
||
|
BIN(ASCII('u')),
|
||
|
BIN(ASCII('c')),
|
||
|
BIN(ASCII('k')),
|
||
|
BIN(ASCII('e'))
|
||
|
);
|