Reputation: 39
I'd like to know how can I create an SQL table containing a column that will contain structured data, as:
CREATE TABLE mytable(
username VARCHAR(20) NOT NULL,
user_structured_data "here the type for structured data"
);
is there any way to do that? thanks.
Upvotes: 0
Views: 1902
Reputation: 27614
Structured Datatype itself SQL provide structured data type. SQL provide structured data type to allow you to use data types as your information type.
SQL not provide any structured type but provide structured data type. In your following query
CREATE TABLE mytable(
username VARCHAR(20) NOT NULL,
user_structured_data TEXT "here the type for structured data long text"
);
This is great documentation for using a structured data type as the type for a column in a regular table
Upvotes: 1
Reputation: 16641
No. You have to make due with the datatypes that are supplied by your Database vendor. You can't create your own, at least not in any of the major databases.
Upvotes: 0