on 03-18-2009 6:54 PM
Hi Gurus,
in table's there is key like primary and secondry?. what is the difference between primary key and secondary key.
Primary key
The field which is Unique and not null is called the Primary Key field
Foreign Key
To establish the relations between 2 tables the same key field in another table is the Foreign key. Foreign key may or may not be Unique and not-null.
thanks
G. Lakshmipathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi nareshkumar,
Primary key
If no WITH key declaration is made, a table type is generic with respect to the primary key.
If a declaration about the uniqueness of the key is not made in key, a table type is partially generic with respect to the key.
If a key declaration with a uniqueness declaration is made in key, a table type is not generic with respect to the primary key.
The non-generic table categories can be split up as follows:
If no primary key is declared for standard tables, this primary key is generic with respect to the key fields and defined implicitly as non-unique.
If no primary key is declared for sorted tables, this primary key is generic with respect to the key fields and uniqueness.
If no primary key is declared for hashed tables, this primary key is generic with respect to the key fields and uniqueness; note, however, that fixed hash tables can have only one unique key.
Secondary key
The genericness of a table type with respect to the secondary key depends (by default) on the genericness of the primary key; you can override it with the WITH|WITHOUT FURTHER SECONDARY KEYS additions.
If the primary key is completely or partially generic, then the table type is by default generic with respect to the secondary key. The standard response can be expressed using the WITH FURTHER SECONDARY KEYS addition. However, if the WITHOUT FURTHER SECONDARY KEYS addition is declared, the table type is generic with respect to the primary key but not with respect to the secondary key.
If the primary key is not generic, then the table type is not generic with respect to the secondary key either (by default). The standard response can be expressed using the WITHOUT FURTHER SECONDARY KEYS addition. If, however, the WITH FURTHER SECONDARY KEYS is declared, the table type is generic with respect to the secondary key but not with respect to the primary key.
Thanks,
Swamy H P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
just search in the forum
Primary key is unique in a table which is identified for each record in a table
http://help.sap.com/saphelp_470/helpdata/en/cf/21ea43446011d189700000e8322d00/frameset.htm
http://help.sap.com/saphelp_470/helpdata/en/cf/21eb20446011d189700000e8322d00/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ec84446011d189700000e8322d00/frameset.htm
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
9 | |
9 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.