Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • MariaDB Cookbook
  • Toc
  • feedback
MariaDB Cookbook

MariaDB Cookbook

By : Daniel Bartholomew
4.2 (9)
close
MariaDB Cookbook

MariaDB Cookbook

4.2 (9)
By: Daniel Bartholomew

Overview of this book

Table of Contents (20 chapters)
close
MariaDB Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Inserting, updating, and deleting dynamic column data


Inserting new data and updating existing data in a dynamic column is not the same as with traditional columns. Without some help from a set of special dynamic columns functions, the standard MariaDB INSERT, UPDATE, and DELETE statements do not understand how to work with a dynamic column or the data stored in it. They will only see it as a BLOB column. This recipe introduces and demonstrates the basic functions used when interacting with a dynamic column.

Getting ready

First, you need to complete the Creating tables with dynamic columns recipe.

How to do it...

  1. Launch the mysql command-line client and connect to the test database in our MariaDB server.

  2. Insert some values into the dyn_example table we created earlier:

    INSERT INTO dyn_example (dyn_cols) VALUES
      (COLUMN_CREATE('name','t-shirt', 'color','blue'
          AS CHAR, 'size','XL' AS CHAR)),
      (COLUMN_CREATE('name','t-shirt', 'color','blue'
          AS CHAR, 'size','L' AS CHAR)),
      (COLUMN_CREATE...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete