a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 78|回复: 0

[综合] Oracle常遇问题解析13

[复制链接]
发表于 2012-8-4 13:54:49 | 显示全部楼层 |阅读模式
53. 如何使select语句使查询结果自动生成序号?  7 _8 X7 e. T$ W' |( A
select rownum,col from table;  3 S: ]- c' P7 l. n3 u( `+ d
  ) z& C2 F8 ]3 q! Q9 q( `- y# q
54. 如何知道数据裤中某个表所在的tablespace?  
+ c8 e2 k2 X# N( e3 }( M4 O, oselect tablespace_name from user_tables where table_name=’test’;  
9 P5 x% s% C2 r" A/ Lselect * from user_tables中有个字段tablespace_name,(oracle);  8 }+ T" m  D  `" ~/ W8 `  n1 X4 _5 v
select * from dba_segments where …;  ) B8 S5 L/ A/ P# @8 [
  
+ S, r* a7 _7 z0 {6 D$ N8 x55. 怎么可以快速做一个和原表一样的备份表?  $ t# r% l8 ^5 O: x+ o+ }$ D
create table new_table as (select * from old_table);  
& T  |  }; ~5 S$ E: {  9 @# G# [7 Z9 P, a: F
55. 怎么在sqlplus下修改procedure?  
6 |6 Q1 @) `3 b3 `, Hselect line,trim(text) t from user_source where name =’a’ order by line;  ( g" [" c/ r6 G8 M3 [# W. `
  " m) w7 h2 o! h' C- \
56. 怎样解除procedure被意外锁定?  ) A( r$ W0 a: m% C
alter system kill session ,把那个session给杀掉,不过你要先查出她的session id  ( t; P/ h, o# o" E# W4 o, ?7 `% G
or  
  a3 ~% ]  ~' o# w, h把该过程重新改个名字就可以了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-2 23:19 , Processed in 0.232742 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表