473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Tables without primary key

Hi,

for an OnlinerReorg (SAP/ORACLE) i have to know the name of the tables
without primary key.

Where can i find it with sqlplus or abap?

THX

Best Regards,
Micha
Jul 19 '05 #1
4 10037

"Michael Maier" <ma***************@yahoo.de> wrote in message
news:99**************************@posting.google.c om...
| Hi,
|
| for an OnlinerReorg (SAP/ORACLE) i have to know the name of the tables
| without primary key.
|
| Where can i find it with sqlplus or abap?
|
| THX
|
| Best Regards,
| Micha

assuming SAP uses database constraints, these are all listed in the
DBA_CONSTRAINTS (or USER_CONSTRAINTS) data dictionary view, CONSTRAINT_TYPE
= 'P'

you can write a query outer joining this to DBA_TABLES (or USER_TABLES) and
check for NULL constraint names, or use a MINUS type query

are you familiar with these techniques?

++ mcs
Jul 19 '05 #2
"Mark C. Stock" <mcstockX@Xenquery .com> wrote in message news:<9M********************@comcast.com>...
"Michael Maier" <ma***************@yahoo.de> wrote in message
news:99**************************@posting.google.c om...
| Hi,
|
| for an OnlinerReorg (SAP/ORACLE) i have to know the name of the tables
| without primary key.
|
| Where can i find it with sqlplus or abap?
|
| THX
|
| Best Regards,
| Micha

assuming SAP uses database constraints, these are all listed in the
DBA_CONSTRAINTS (or USER_CONSTRAINTS) data dictionary view, CONSTRAINT_TYPE
= 'P'

you can write a query outer joining this to DBA_TABLES (or USER_TABLES) and
check for NULL constraint names, or use a MINUS type query

are you familiar with these techniques?

++ mcs


Here you are. ^_^

select owner, table_name
from dba_tables
where table_name not in
(select TABLE_NAME
from dba_constraints
where CONSTRAINT_TYPE='P')
and owner not in ('SYS', 'SYSTEM');
Jul 19 '05 #3
Hi,

thx a lot, i will try it tomorrow.
Best Regards,
Micha
Jul 19 '05 #4
ma***************@yahoo.de (Michael Maier) wrote in message news:<99**************************@posting.google. com>...
Hi,

thx a lot, i will try it tomorrow.
Best Regards,
Micha


-------------------------------------------------

An easier and faster way to do it would be doing the following:
select owner,table_name from dba_tables
minus
select owner,table_name from dba_constraints
where constraint_type != 'P'

Pablo Rovedo
from Argentina
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: serge | last post by:
How can i enter Default Values of " " to all the columns of type character of all the tables (excluding system tables) and Default Values of 0 of all columns of type numbers. Excluding all primary...
2
by: ¹ùÑÇ·æ | last post by:
first of all ,i will thank you for reading this . :-) i am writing a programming to access SQL-SERVER. i use some codes as follows in order to update data changed in datagrid1. but i found that...
2
by: Agnes | last post by:
I got a table which without primary key. case 1) I can process insertcommand and daMytable.update..etc case 2) However, if i process updatecommand , As I run daMytable.update .It returns error...
4
by: neena | last post by:
how to display values from database tables without using datagrid control in C# .net.I want to search the values from database & the search results to be shown as rows in the web form,without the use...
9
ChaseCox
by: ChaseCox | last post by:
I know there is a way to filter tables without using a query, but I am not sure how to do it. I think it is done placing the SQL code right into the VB code. Any help would be great, or a reference...
2
by: Danny | last post by:
Hello, We imported a bunch of tables from a database and realized that the primary keys weren't copied to the destination db. In order to re- create the keys, we need to know which tables have...
0
by: mark.briscoe | last post by:
hi, im trying to create collapsible tables without using a javascript method to format the table, this is because i need it to work inside an email (the java versions don't work), I was wondering...
4
by: Michael Maier | last post by:
Hi, for an OnlinerReorg (SAP/ORACLE) i have to know the name of the tables without primary key. Where can i find it with sqlplus or abap? THX Best Regards,
2
by: amir | last post by:
My Problem: ------------------ 1- When I was trying to run some queries like below, I got the error like this: ------------------------------ Command Entered ------------------------------...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.