Searching Bank String

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc
Post Reply
neto.sabino
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 7
Joined: Wed, 14 Nov 2007 1:31 pm
Location: SP
Contact:
Sabino Neto

Next weight:

I need two things:
1 How do I show all tablets on the bank? I'm using the
"SELECT * from ALL_TABLES;" But as I am using direct from the termianl it show all the bagunced tablets and so I do not understand what is q.

2nd I am a user registered but I do not know which is the tablea that he is included (it was not worth saying that it can be in the user tables in heheh)
]] Who can help me I thank you


hugs
Tineks
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 365
Joined: Tue, 24 May 2005 2:24 pm
Location: Araraquara - SP
Cristiano (Tineks)
Araraquara - SP

And there grandson, beleza ??

in the research of all_tables you can filter by the table_name, ex:

Select all

 
SELECT TABLE_NAME FROM ALL_TABLES WHERE OWNER='proprietario' 
/ 
the second question I did not understand right, this bank user or system?

[] 's
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Brother, beleza?

Are you using SQL * Plus? ?
If you are, give a:

Select all

 
SET LINESIZE 10000; 
and then list again.
About the issue of your user's tables, search for user_tables?
neto.sabino
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 7
Joined: Wed, 14 Nov 2007 1:31 pm
Location: SP
Contact:
Sabino Neto

So:

I'm using it on the console even, but I would not have a problem I open a Plsql block, but I need to do it in correct cursor?

And another my second point was that I registered by the user system and wanted to know which table was made this inclusion (code serivodor is not working). Taking advantage also wanted to know what are the tables that make fk for the user registration table.

Thanks
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Brother,

About constraints, are here:

Select all

 
SELECT * 
 FROM user_constraints 
 WHERE TABLE_NAME LIKE '%TUA_TABELA%'; 
Another tip: Constraints, search for the forum by User_constraints or constraints that will find interesting links, such as this:
http://en.glufke.net/oracle/viewtopic.p ... onstraints

About the list:

If you want to put in PL / SQL, or an implicit cursor (for) or an explicit cursor is created, with Open, Loop, Fetch and Close, beleza?

Examples You also find here in the forum, searching for cursor.

Whatever, send it there.
neto.sabino
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 7
Joined: Wed, 14 Nov 2007 1:31 pm
Location: SP
Contact:
Sabino Neto

Brothe Valeu

I'll give you a search in the tables.

Seeing (again hehehe). Dude I'm having trouble setting up a SGBD to access the bank.

ProBelams:

I do not know what the bank's SID is.

Could you help me?
Tineks
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 365
Joined: Tue, 24 May 2005 2:24 pm
Location: Araraquara - SP
Cristiano (Tineks)
Araraquara - SP

So Sabino, beleza ??

To make the query you can use a cursor if you want, or you can do a direct loop, ex ..

Select all

 
for reg in (select * from ...) loop 
 
end loop; 
here is a script that you can use To find the FK's on your table.

Select all

 
SELECT TPAI.TABLE_NAME TABELA_PAI  
       , TFILHA.TABLE_NAME TABELA_FILHA  
       , CFILHA.COLUMN_NAME COLUNA_TABELA_FILHA  
FROM   SYS.ALL_CONSTRAINTS TPAI  
       INNER JOIN SYS.ALL_CONSTRAINTS TFILHA ON TPAI.CONSTRAINT_NAME = TFILHA.R_CONSTRAINT_NAME  
       INNER JOIN SYS.ALL_CONS_COLUMNS CFILHA ON TFILHA.CONSTRAINT_NAME = CFILHA.CONSTRAINT_NAME  
WHERE  TPAI.CONSTRAINT_TYPE = 'P' --  ( PRIMARY )  
       AND TPAI.TABLE_NAME = 'T_PAI'  -- INFORMAR NOME DA TABELA PAI  
ORDER BY TABELA_FILHA, COLUNA_TABELA_FILHA  
If you want to do something more dynamic you can use the select above together with some search examples in the bank, q can be found at this link .. http://en.glufke.net/oracle/viewtopic.p ... ht=execute

[] 's
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Brother, on the bank ... Next ...
I know in the table below contains some information, but, I think you better post a specific topic here in the forum, in the DBA part that they will help you, Surely, can it be?

Select all

 
SELECT * FROM V$DATABASE; 
Whatever, we are there.
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests