Skip to content

Instantly share code, notes, and snippets.

@rmariuzzo
Created June 10, 2014 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmariuzzo/dd1eba320485d53b3b17 to your computer and use it in GitHub Desktop.
Save rmariuzzo/dd1eba320485d53b3b17 to your computer and use it in GitHub Desktop.
use deleteme;
create table assets (
item_name varchar(32) primary key,
dynamic_cols blob
);
INSERT INTO assets VALUES
('MariaDB T-shirt', COLUMN_CREATE('campo_padre', COLUMN_CREATE('hijo', 'valor del hijo')));
select column_get(column_get(dynamic_cols, 'campo_padre' as char), 'hijo' as char) as a from assets;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment