//登陸
sys/密碼 as sysdba
//建立表空間
create tablespace 表空間名稱 datafile ‘表空間路徑.dbf’ size 200m autoextend on next 10m maxsize unlimited;
//建立用戶名
create user 用戶名 identified by 密碼 default tablespace 表空間名;
//受權
grant connect, resource to 用戶名;
grant dba to 用戶名;
//表空間下線/上線
alter tablespace 表空間名稱 offline;
alter tablespace 表空間名稱 online;
**如下最好不要用**
//修改表空間名稱
alter tablespace 舊錶空間名稱 rename to 新表空間名稱;
//修改用戶名
select user#,name from user$ where name='用戶名';
//修改用戶密碼
alter user 用戶名 identified by 新密碼;
//查看用戶列表
select username from dba_users
複製代碼
例如:bash
保留兩位小數
ROUND(a.MONEY_FILIALE*(1-a.TAXRATE/100),2)
複製代碼