create table t_user2(f_userid int, f_username varchar(20)); create table if not exists t_error_log(f_logid serial, f_sql_error_num int, f_isam_error_num int); create table t_dept(f_deptid int, f_deptname varchar(20)); create table t_employee(f_employeeid int, f_dept int,...
create table t_user2(f_userid int, f_username varchar(20)); create table if not exists t_error_log(f_logid serial, f_sql_error_num int, f_isam_error_num int); create table t_dept(f_deptid int, f_deptname varchar(20)); create table t_employee(f_employeeid int, f_dept int,...
gbase> CREATE TABLE t (a int NOT NULL DEFAULT 1, b varchar(10)); 一:增加列 gbase> ALTER TABLE t ADD column c varchar(10) null; 二:删除列 gbase> ALTER TABLE t DROP column b; 三:修改表名称 gbase> alter table t rename ttt; 或者 gbase> rename table ttt to t; 四:修改列名称...
create [standard | raw] table [if not exists] <table_name> (colname1 data_type1, colname2 data_type2, ...); 重命名表 rename table <old_table_name> to <new_table_name>; 删除表 drop table [if exists] <table_name>; 演示 create table t_user1(f_userid int, f_username varchar(...
CREATE DATABASE test; CREATE DATABASE IF NOT EXISTS test; 删除数据库 DROP DATABASE test; DROP DATABASE IF EXISTS test; 1. 2. 3. 4. 5. 6. 表 用户可以通过CREATE TABLE命令在当前数据库创建一个指定名称的表。 GBase 8a支持两种表类型,普通表、和临时表。
--创建数据库 database_name:数据库名称createdatabase ifnotexistsdatabase_name;--删除数据库dropdatabase ifexistsdatabase_name; 2. 创建表 tablename :表名称 CREATETABLEtablename ( aaint(11) AUTO_INCREMENT, bbvarchar(20), ccdecimal(10,4) , ...
2. GBase UP直接去星环中建表(text表),无法进行insert,需要先通过beeline创建orc表,再通过gccli命令行create table if not exists 。 beeline > create table if not exists t_hive(a int) clustered by (a) into 4 buckets stored as orc tblproperties ("transactional"="true"); ...
create table if not exists t_error_log(f_logid serial, f_sql_error_num int, f_isam_error_num int); create procedure up_test_exception1() define sql_err_num int; define isam_err_num int; on exception set sql_err_num, isam_err_num ...
GBase 8a 管理员手册 GBase 8a 分析型数据管理系统 管理员手册V8.5.1.2 南大通用数据技术有限公司- 1 -
gbase> create table tevent(d datetime); Query OK, 0 rows affected (Elapsed: 00:00:00.61) 创建最简单的一次性event 该event只运行一次,且马上运行。 gbase> create event test_event1 on schedule at current_timestamp do insert into tevent values(now()); ...