--创建用户及授权
CREATE USER A_hr IDENTIFIED BY 123456;
GRANT CONNECT,RESOURCE to A_hr;
--drop user A_hr cascade
--创建用户表
CREATE TABLE T_user(
id NUMBER PRIMARY KEY NOT NULL,
name VARCHAR2(50) NOT NULL,
age NUMBER(6) NOT NULL,
hight NUMBER(6,2) NOT NULL
)
--创建用户表序列
CREATE SEQUENCE seq_t_user INCREMENT BY 1 START WITH 1 CACHE 10;
--插入数据
INSERT INTO T_user (id,Name,Age,Hight) VALUES (seq_t_user.nextval,'景临境',23,186.00);
INSERT INTO T_user (id,Name,Age,Hight) VALUES (seq_t_user.nextval,'景临境2',23,182.00);
INSERT INTO T_user (id,Name,Age,Hight) VALUES (seq_t_user.nextval,'景临境3',23,183.00);
INSERT INTO T_user (id,Name,Age,Hight) VALUES (seq_t_user.nextval,'景临境4',23,184.00);
INSERT INTO T_user (id,Name,Age,Hight) VALUES (seq_t_user.nextval,'景临境5',23,185.00);
SELECT * FROM t_user;