国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > Oracle > 正文

oracle 常用的一些命令或者sql 語句

2024-08-29 13:32:01
字體:
來源:轉載
供稿:網友

1. 創建一個用戶,并為該用戶分配create權限,分配表空間:
create user scott identified by tiger;
grant create session to scott;

grant create table to scott;

alter user scott default tablespace users;

alter user scott quota 512m on users;

2. 查找where條件指定的用戶為owner的所有表名稱:
select owner, table_name from dba_tables where owner='scott';

3. 在某一指定的表上創建指定參數的索引。
create index ind_test on test(x) tablespace users storage
(initial 2k
next 2k
minextents 1
maxextents 100
pctincrease 0);

4. 查看指定用戶為owner的索引名稱:
select index_name, table_owner from dba_indexes where owner='scott';

5. 查看指定表上的所有索引信息:
select index_owner, index_name, column_name from dba_ind_columns where table_name='scott';

6. 創建序列:
create s
incremen
start wi
maxvalue
cycle;

7. 使用序列:
insert into scott.test
values(staff_id.nextval,
'test');

8. 查看表空間信息:
select * from dba_tablespaces;

9. 查看當前在線用戶:
select username from v$session;

10. how can i compile and link my application?
answer:
compiling and linking are very platform specific. your system-specific oracle
documentation has instructions on how to link a pro*c/c++ application. on unix
systems, there is a makefile called proc.mk in the demo directory. to link, say, the
demo program sample1.pc, you would enter the command line
make -f proc.mk sample1
if you need to use special precompiler options, you can run pro*c/c++ separately,
then do the make. or, you can create your own custom makefile. for example, if
your program contains embedded pl/sql code, you can enter
proc cv_demo userid=scott/tiger sqlcheck=semantics
make -f proc.mk cv_demo
on vms systems, there is a script called lnproc that you use to link your
pro*c/c++ applications.
 
 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 常宁市| 奈曼旗| 汉源县| 资阳市| 延寿县| 镇宁| 临漳县| 黄梅县| 九龙坡区| 泗阳县| 临夏市| 加查县| 常宁市| 金平| 博白县| 阿城市| 米林县| 孙吴县| 永川市| 阿尔山市| 江川县| 徐州市| 龙川县| 乐清市| 淮安市| 克什克腾旗| 井研县| 马尔康县| 延边| 沁水县| 瓦房店市| 武强县| 富平县| 丽水市| 武山县| 赞皇县| 绥芬河市| 湖北省| 苏尼特右旗| 峨眉山市| 德阳市|