• 文字广告位
  • 文字广告位
  • 文字广告位
您现在的位置: 站长手册 >> 数据库 >> ORACLE >> 正文
站内搜索
Google
oracle 常用的一些命令或者sql 语句
        ★★★ 【字体:

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

雅虎收藏夹 百度收藏 Google书签 Yahoo书签 新浪ViVi 搜狐网摘 365Key网摘 天极网摘 diglog 和讯网摘 POCO网摘 YouNote网摘 博拉网 天下图摘 Del.icio.us digg reddit spurl BlinkList blogmarks
人气: 来源:网络 作者:佚名 所属栏目:ORACLE [切换到繁體中文]

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.
 
 

网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
姓 名: *(必填项) ·注册用户·
Email: QQ号:
评 分: 1分 2分 3分 4分 5分
  • 您可以发表评论支持你喜欢的文章。
  • 请遵守《互联网电子公告服务管理规定》
  • 请遵守中华人民共和国各项有关法律法规。
  • 严禁发表危害国家安全、政治、黄色淫秽等内容的评论。
  • 评论人需对自己在使用评论过程中的行为承担法律责任。
  • 本站管理员有权保留或删除评论内容。
  • 评论内容只代表个人观点,与本网站立场无关。
站内文章搜索
·最新文章      
·热门文章      
| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | | 京ICP备 05004866号 |
版权所有 2007-2008 站长手册 WWW.ZZSC.ORG 业务联系 zzsc.org#gmail.com