通用
字符集
select userenv('language') from dual;
服务端字符集:
select nls_charset_name(1) from dual;
select nls_charset_id(‘WE8MSWIN1252) from dual;
查看版本
select * from v$version
查询约束
select table_name from user_constraints where constraint_name = 'FK236DF0421758F244'; 表空间
//创建临时表空间
create temporary tablespace test_temp
tempfile 'E:\oracle\product\10.2.0\oradata\testserver\test_temp01.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
//创建数据表空间
create tablespace test_data
logging
datafile 'E:\oracle\product\10.2.0\oradata\testserver\test_data01.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;
//创建用户并指定表空间
create user username identified by password