Please tell me a query to find the Primary key,Foreign
key,primary Index,PPI for the Database?
Answer Posted / innocent
Hi Parsad,
I hope by running below query you'll get many part of your
answer.
_----------------------------------------------------------_
Select DatabaseName, TableName ,columnName,
Case When IndexType='K' Then 'Primary Key'
When IndexType='S' Then 'Secondary Index'
When IndexType='P' Then 'Primary Index'
When IndexType='Q' Then 'PPIndex'
When IndexType='J' Then 'Join Index'
End as implimented_Index
From DBC.Indices
Where TableName in
( Select distinct TableName
From DBC.Tablesize
Where DatabaseName <>'DBC'
And
CurrentPerm>0
)
Order by 1,2,3
_
Innocent
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
How can we check the version of Teradata that we are using currently?
List out all forms of LOCKS that are available in Teradata.
What is upsert statement in teradata?
Which is faster fastload or multiload?
What are the scenarios in which full table scans occurs?
Define views in teradata with syntax.
Explain the term 'primary key' related to relational database management system?
What are the commands to make a new table, change a table and remove a table in teradata?
What are normalization, first normal form, second normal form and third normal form?
Explain the term 'database' related to relational database management system?
What do you mean by tpt in teradata?
What is meant by a Clique?
Explain and compare pros and cons of snow flake schemas?
What is TPD?
What are the available primary index types in teradata.