dashDB - Creating a table with CLOB column type

In order to create a table with clob column type, the table has to be created with "ORGANIZE BY ROW";

DROP TABLE m_pi_error;

CREATE TABLE m_pi_error (
  id INTEGER NOT NULL,
  customer_id VARCHAR(15),
  twitter_id VARCHAR(255),
  err_msg clob(5M),
  create_time date,
  PRIMARY KEY(id)
) ORGANIZE BY ROW;

DROP TABLE m_pi_note;

CREATE TABLE m_pi_note (
  id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1),
  customer_id VARCHAR(15),
  twitter_id VARCHAR(255),
  personal_note clob(5M),
  create_time date,
  PRIMARY KEY(id)
)ORGANIZE BY ROW;

DROP TABLE m_pi_values;

CREATE TABLE m_pi_values (
  CUSTOMER_ID varchar(30) DEFAULT NULL,
  TWITTER_ID varchar(30) DEFAULT NULL,
  word_count double DEFAULT NULL,
  processed_language varchar(30) DEFAULT NULL,
  big5_openness double DEFAULT NULL,
  facet_adventurousness double DEFAULT NULL,
  facet_artistic_interests double DEFAULT NULL,
  facet_emotionality double DEFAULT NULL,
  facet_imagination double DEFAULT NULL,
  facet_intellect double DEFAULT NULL,
  facet_liberalism double DEFAULT NULL,
  big5_conscientiousness double DEFAULT NULL,
  facet_achievement_striving double DEFAULT NULL,
  facet_cautiousness double DEFAULT NULL,
  facet_dutifulness double DEFAULT NULL,
  facet_orderliness double DEFAULT NULL,
  facet_self_discipline double DEFAULT NULL,
  facet_self_efficacy double DEFAULT NULL,
  big5_extraversion double DEFAULT NULL,
  facet_activity_level double DEFAULT NULL,
  facet_assertiveness double DEFAULT NULL,
  facet_cheerfulness double DEFAULT NULL,
  facet_excitement_seeking double DEFAULT NULL,
  facet_friendliness double DEFAULT NULL,
  facet_gregariousness double DEFAULT NULL,
  big5_agreeableness double DEFAULT NULL,
  facet_altruism double DEFAULT NULL,
  facet_cooperation double DEFAULT NULL,
  facet_modesty double DEFAULT NULL,
  facet_morality double DEFAULT NULL,
  facet_sympathy double DEFAULT NULL,
  facet_trust double DEFAULT NULL,
  big5_neuroticism double DEFAULT NULL,
  facet_anger double DEFAULT NULL,
  facet_anxiety double DEFAULT NULL,
  facet_depression double DEFAULT NULL,
  facet_immoderation double DEFAULT NULL,
  facet_self_consciousness double DEFAULT NULL,
  facet_vulnerability double DEFAULT NULL,
  need_challenge double DEFAULT NULL,
  need_closeness double DEFAULT NULL,
  need_curiosity double DEFAULT NULL,
  need_excitement double DEFAULT NULL,
  need_harmony double DEFAULT NULL,
  need_ideal double DEFAULT NULL,
  need_liberty double DEFAULT NULL,
  need_love double DEFAULT NULL,
  need_practicality double DEFAULT NULL,
  need_self_expression double DEFAULT NULL,
  need_stability double DEFAULT NULL,
  need_structure double DEFAULT NULL,
  value_conservation double DEFAULT NULL,
  value_hedonism double DEFAULT NULL,
  value_openness_to_change double DEFAULT NULL,
  value_self_enhancement double DEFAULT NULL,
  value_self_transcendence double DEFAULT NULL,
  behavior_sunday double DEFAULT NULL,
  behavior_monday double DEFAULT NULL,
  behavior_tuesday double DEFAULT NULL,
  behavior_wednesday double DEFAULT NULL,
  behavior_thursday double DEFAULT NULL,
  behavior_friday double DEFAULT NULL,
  behavior_saturday double DEFAULT NULL,
  behavior_0000 double DEFAULT NULL,
  behavior_0100 double DEFAULT NULL,
  behavior_0200 double DEFAULT NULL,
  behavior_0300 double DEFAULT NULL,
  behavior_0400 double DEFAULT NULL,
  behavior_0500 double DEFAULT NULL,
  behavior_0600 double DEFAULT NULL,
  behavior_0700 double DEFAULT NULL,
  behavior_0800 double DEFAULT NULL,
  behavior_0900 double DEFAULT NULL,
  behavior_1000 double DEFAULT NULL,
  behavior_1100 double DEFAULT NULL,
  behavior_1200 double DEFAULT NULL,
  behavior_1300 double DEFAULT NULL,
  behavior_1400 double DEFAULT NULL,
  behavior_1500 double DEFAULT NULL,
  behavior_1600 double DEFAULT NULL,
  behavior_1700 double DEFAULT NULL,
  behavior_1800 double DEFAULT NULL,
  behavior_1900 double DEFAULT NULL,
  behavior_2000 double DEFAULT NULL,
  behavior_2100 double DEFAULT NULL,
  behavior_2200 double DEFAULT NULL,
  behavior_2300 double DEFAULT NULL,
  cp_automobile_ownership_cost double DEFAULT NULL,
  cp_automobile_safety double DEFAULT NULL,
  cp_clothes_quality double DEFAULT NULL,
  cp_clothes_style double DEFAULT NULL,
  cp_clothes_comfort double DEFAULT NULL,
  cp_influence_brand_name double DEFAULT NULL,
  cp_influence_utility double DEFAULT NULL,
  cp_influence_online_ads double DEFAULT NULL,
  cp_influence_social_media double DEFAULT NULL,
  cp_influence_family_members double DEFAULT NULL,
  cp_spur_of_moment double DEFAULT NULL,
  cp_credit_card_payment double DEFAULT NULL,
  cp_eat_out double DEFAULT NULL,
  cp_gym_membership double DEFAULT NULL,
  cp_outdoor double DEFAULT NULL,
  cp_concerned_environment double DEFAULT NULL,
  cp_start_business double DEFAULT NULL,
  cp_movie_romance double DEFAULT NULL,
  cp_movie_adventure double DEFAULT NULL,
  cp_movie_horror double DEFAULT NULL,
  cp_movie_musical double DEFAULT NULL,
  cp_movie_historical double DEFAULT NULL,
  cp_movie_science_fiction double DEFAULT NULL,
  cp_movie_war double DEFAULT NULL,
  cp_movie_drama double DEFAULT NULL,
  cp_movie_action double DEFAULT NULL,
  cp_movie_documentary double DEFAULT NULL,
  cp_music_rap double DEFAULT NULL,
  cp_music_country double DEFAULT NULL,
  cp_music_r_b double DEFAULT NULL,
  cp_music_hip_hop double DEFAULT NULL,
  cp_music_live_event double DEFAULT NULL,
  cp_music_playing double DEFAULT NULL,
  cp_music_latin double DEFAULT NULL,
  cp_music_rock double DEFAULT NULL,
  cp_music_classical double DEFAULT NULL,
  cp_read_frequency double DEFAULT NULL,
  cp_books_entertainment_mag double DEFAULT NULL,
  cp_books_non_fiction double DEFAULT NULL,
  cp_books_financial_investing double DEFAULT NULL,
  cp_books_autobiographies double DEFAULT NULL,
  cp_volunteer double DEFAULT NULL
);

DROP TABLE m_twitter_error;
CREATE TABLE m_twitter_error (
  id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1),
  customer_id varchar(15) DEFAULT NULL,
  twitter_id varchar(255) DEFAULT NULL,
  err_msg clob(5M),
  create_time date DEFAULT NULL,
  PRIMARY KEY (id)
) ORGANIZE BY ROW;

DROP TABLE m_twitter_note;
CREATE TABLE m_twitter_note (
  id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1),
  customer_id varchar(15),
  twitter_id varchar(255),
  twitter_note clob(5M),
  create_time date DEFAULT NULL,
  PRIMARY KEY (id)
) ORGANIZE BY ROW;

 

时间: 2024-11-06 10:33:36

dashDB - Creating a table with CLOB column type的相关文章

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [others] in table [auth_user]; found [varchar (Types#VARCHAR)], but expec

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [others] in table [auth_user]; found [varchar (Types#VARCHAR)], but expecting [integer (Types#INTEGER)] 这个错误是由于使用springdata

greendao table' has no column named 'column' code -1的问题。

关于greendao版本的问题..greendao compile 'org.greenrobot:greendao:3.0.1'在创建数据库的时候因为把名字多加了.db导致 table' has no column named 'column' code -1的问题.greendao不同的版本会有一些细致的变化 'org.greenrobot:greendao:3.2.0'的就不会产生这个问题!! greendao table' has no column named 'column' cod

batch modify column type

CREATE OR REPLACE PROCEDURE ModifyColumnTypeIS  sqlRenameColumn CONSTANT VARCHAR2(100) := 'alter table [tablename] rename column [targetcolumn] to [targetcolumn]_tmp';  sqlAddColumn CONSTANT VARCHAR2(100) :=  'alter table [tablename] add [targetcolum

org.hibernate.HibernateException: Wrong column type

这个问题一般出现在我们使用定长的字符串作为主键(其它字段也可能)的时候,如数据库中的ID为char(16).虽然很多资料上都说不推荐这样做,但实际上我们在做很多小case的时候自己为了方便也顾不得那么多,随心所欲地设计.其实我们就用INT的主键,只是对你原有的ID(char(16))增加一个Unique Check或者是像在MySQL中增加一个Unique索引又费得了多少事呢. 如果使用char()做为主键时出现如题错误,其很可能的原因在于你的hibernate.cfg.xml文件中的关于Hib

SpringBoot+MyBatis中自动根据@Table注解和@Column注解生成ResultMap

其实我一点都不想用mybatis,好多地方得自己写,比如这里. 使用mybatis要写大量的xml,烦的一批.最烦人的莫过于写各种resultmap,就是数据库字段和实体属性做映射.我认为这里应该是mybatis自动支持的,但是,它没有.为了轻量化(caocaocoa)???. 很少用mybatis,不知道有没有相关插件.只有自己写方法实现了. 先整理一下大体思路: 1.扫描项目代码下的所有类 2.选出所有类中的含有Table注解的类 3.根据column注解找出类下的属性映射关系 4.创建my

SQLAlchemy Table(表)类方式 - Table类和Column类

Table 构造方法 1 Table(name, metadata[, *column_list][, **kwargs]) 参数说明: name 表名 metadata 元数据对象 column_list 是列(Column或其他继承自SchemaItem的对象)列表 kwargs主要内容: schema: (None)表的模式(一般默认是数据库名, 无需特别指定; Oracle中是owner, 当一个数据库由多个用户管理时,用户的默认数据库不是要连接的数据库时,需要指定此项) autoloa

Creating HTML table with vertically oriented text as table header 表头文字方向

AS an old question, this is more like info or reminder about vertical margin or padding in % that takes parent's width as reference . If you use a pseudo element and vertical-padding, you may basicly draw a square box or <td> : http://jsfiddle.net/q

antd的table组件设置Column的width列宽度不生效问题

超长连续字段(长数字和长单词) 破坏表格布局的问题(即使你指定了列的宽度也会被挤开),之前组件内默认加过 word-break: break-word; 去纠正此类布局,又会引起其他的问题. 所以最好的解决方案可能还是不默认 break word,提供一个属性来针对某些列进行断行处理. columns={[ ... textWrap: 'word-break', ]} 还可以支持 columns={[ ... ellipsis: true, ]} 注意,在 3.24.0 之前,你需要针对超长字段

postgresql----继承表inherits parent table

使用INHERITS创建的新表会继承一个或多个父表,子表只会继承父表的表结构和NOT NULL,DEFAULT,CHECK三种约束,主键,外键和唯一键以及索引不会被继承,所以修改父表的结构(增删字段),NOT NULL,DEFAULT和CHECK约束会自动同步子表修改. 示例1. create table tbl_inherits_parent( a int not null, b varchar(32) not null default 'Got u', c int check (c > 0)