oralce 查询tc数据库一些技巧
oralce 查询tc数据库一些技巧
C:\Users\Administrator>set oralce_sid=tc10;
设置oracle实例
C:\Users\Administrator>sqplus/nolog
'sqplus' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Administrator>sqlplus/nolog
SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 11 01:00:03 2014
Copyright (c) 1982, 2010, Oracle.All rights reserved.
SQL> conn /as sysdba;
使用sysdba直接连接数据库
Connected.
SQL> select owner from dba_all_tables where table_name like '%PITEM%';
查找出所有的dba表,找到tc的PITEM的这个表的owner
OWNER
------------------------------
TC_ADMINISTRATOR
TC_ADMINISTRATOR
TC_ADMINISTRATOR
TC_ADMINISTRATOR
TC_ADMINISTRATOR
TC_ADMINISTRATOR
TC_ADMINISTRATOR
TC_ADMINISTRATOR
TC_ADMINISTRATOR
9 rows selected.
SQL> select pitem_id from TC_ADMINISTRATOR.PITEM where rownum<10;
通过添加owner可以直接查询PITEM表
PITEM_ID
--------------------------------------------------------------------------------
000001
000002
000003
000004
000005
000006
000007
000008
000009
9 rows selected.
为了方便,切换使用owner帐号登录,这样就可以直接查找了
SQL> conn
Enter user-name: TC_ADMINISTRATOR
Enter password:
Connected.
SQL> select puid from PBOUNDINGBOX where rownum<10;
PUID
---------------
R7aJs_c24VSRuB
xKWJfazn4VSRuB
yUZJs_c24VSRuB
设置linesize可以调整显示
SQL> set linesize 2000
SQL> select * from PBOUNDINGBOX where rownum<10;
PUID PX_MIN PY_MIN PZ_MIN PX_MAX PY_MAX PZ_MAX RPARENTU RPARENTC
--------------- ---------- ---------- ---------- ---------- ---------- ---------- --------------- ----------
R7aJs_c24VSRuB -.08328 -.08708333 -.07975309 .194439264 .087083333 .260555556 R7UJs_c24VSRuB 59
yUZJs_c24VSRuB -.08328 -.08708333 -.07975309 .194439264 .087083333 .260555556 yUTJs_c24VSRuB 59
xKWJfazn4VSRuB 0 0 0 .1 .1 .1 xKQJfazn4VSRuB 59
请问这个查出的内容是什么呢?select * from PBOUNDINGBOX where rownum<10;
页:
[1]