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把该过程重新改个名字就可以了。 |