How many primary key fields  allowed for one table?

hi,
when i creating a table , how many primary key fields are allowed for one table.
please any one give ans
thanks

Just checked it,  Its 255, not 155.  You can have as many key fields as you want, but you can not go over the 255 byte length for the total of all key fields.  You will get a warning for over 120, as it says that there is limited functionality with a key over 120 in length.
Again, this is a total length of all key fields.
Regards,
Rich Heilman

Similar Messages

  • How many primary keys use in one table

    Hi,
    Please help me. Maximum How many primary keys use with in one table
    Regards,
    Sunil Kumar.T

    Hi,
    For my knowledge, It depends on the Database & version u r working.. Right..
    This is a sample description what I seen for a Database...
    Technical Specification of SAP DB Version 7.4
    Description                            Maximum Value
    Database size                    32 TB (with 8 KB page size)
    Number of files/volumes per database64...4096, specified by a configuration parameter
    File/volume size (data)      518 ...8 GB (dependent on operating system limitations)
    File/volume size (log)1      6 TB (dependent on operating system limitations)
    SQL statement length>=  16 KB (Default value 64 KB, specified by a system variable)
    SQL character string lengthSpecified by a system variable
    Identifier length                32 characters
    Numeric precision              38 places
    Number of tables unlimited
    Number of columns per table (with KEY)  1024
    Number of columns per table (without KEY)  1023
    Number of primary key columns per table  512
    Number of columns in an index  16
    Reward Points if useful

  • How many primary keys can w have in cube, ods objects?

    how many primary keys can w have in cube, ods objects?

    Hi Naresh,
    16 primary keys only possible(for cube: 16 dimensions, ODS - Keyfields)
    For ODS:
    -         You can create a maximum of 16 key fields (if you have more key fields, you can combine fields using a routine for a key field (concatenate).)
    -         You can create a maximum of 749 fields
    -         You can use 1962 bytes (minus 44 bytes for the change log)
    -         You cannot include key figures as key fields
    More info: [Creating ODS Objects|http://help.sap.com/saphelp_nw04/helpdata/EN/4a/e71f39488fee0ce10000000a114084/content.htm]
    Hope it Helps
    Srini
    [Dont forget to close the call by assigning poings.... - Food for Points: Make a Difference through Community Contribution!|https://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/007928c5-c4ef-2a10-d9a3-8109ae621a82]

  • Is there a limit to how many pages i can have for one website using muse/business catalyst?

    is there a limit to how many pages i can have for one website using muse/business catalyst?

    Thank you. I've been searching everywhere and I couldn't find anything the mentioned it. I appreciate the feedback!

  • How many concurrent users are allowed for an Azure Virtual Machine?

    How many concurrent users are allowed for an Azure Virtual Machine?
    Please share the details with the Azure VM size. Currently I have Standard VM of size D13(4 cores, 28GB RAM)

    Hi SanPSK,
    Thanks for posting here.
    I suggest you to check this article for Azure VM size
    https://msdn.microsoft.com/en-us/library/azure/dn197896.aspx
    For the concurrent users on VM - A maximum of 2 concurrent connections are supported, unless the server is configured as a Remote Desktop Services session host.
    Girish Prajwal

  • How many devices can i use for one apple-id

    Hi,
    My question is how many devices i can use for one apple-id.
    And where am i going to find the answer?
    Thanks,
    Vermeulen Francis

    You may read this discussion: https://discussions.apple.com/thread/3695326?start=0&tstart=0.

  • How many SECONDARY INDEXES are created for CLUSTER TABLES?

    how many SECONDARY INDEXES are created for CLUSTER TABLES?
    please explain.

    There seems to be some kind of misunderstanding here. You cannot create a secondary index on a cluster table. A cluster table does not exist as a separate physical table in the database; it is part of a "physical cluster". In the case of BSEG for instance, the physical cluster is RFBLG. The only fields of the cluster table that also exist as fields of the physical cluster are the leading fields of the primary key. Taking again BSEG as the example, the primary key includes the fields MANDT, BUKRS, BELNR, GJAHR, BUZEI. If you look at the structure of the RFBLG table, you will see that it has primary key fields MANDT, BUKRS, BELNR, GJAHR, PAGENO. The first four fields are those that all cluster tables inside BSEG have in common. The fifth field, PAGENO, is a "technical" field giving the sequence number of the current record in the series of cluster records sharing the same primary key.
    All the "functional" fields of the cluster table (for BSEG this is field BUZEI and everything beyond that) exist only inside a raw binary object. The database does not know about these fields, it only sees the raw object (the field VARDATA of the physical cluster). Since the field does not exist in the database, it is impossible to create a secondary index on it. If you try to create a secondary index on a cluster table in transaction SE11, you will therefore rightly get the error "Index maintenance only possible for transparent tables".
    Theoretically you could get around this by converting the cluster table to a transparent table. You can do this in the SAP dictionary. However, in practice this is almost never a good solution. The table becomes much larger (clusters are compressed) and you lose the advantage that related records are stored close to each other (the main reason for having cluster tables in the first place). Apart from the performance and disk space hit, converting a big cluster table like BSEG to transparent would take extremely long.
    In cases where "indexing" of fields of a cluster table is worthwhile, SAP has constructed "indexing tables" around the cluster. For example, around BSEG there are transparent tables like BSIS, BSAS, etc. Other clusters normally do not have this, but that simply means there is no reason for having it. I have worked with the SAP dictionary for over 12 years and I have never met a single case where it was necessary to convert a cluster to transparent.
    If you try to select on specific values of a non-transparent field in a cluster without also specifying selections for the primary key, then the database will have to do a serial read of the whole physical cluster (and the ABAP DB interface will have to decompress every single record to extract the fields). The performance of that is monstrous -- maybe that was the reason of your question. However, the solution then is (in the case of BSEG) to query via one of the index tables (where you are free to create secondary indexes since those tables are transparent).

  • Adding 2 new fields as Primary Key field in a Z Table which is existing PRD

    Hi Friends,
    I have to add two new fields as primary key fields in a Z TABLE, which is existing in Quality and Production Systems with Data.
    If I incorporate these two new fields (Primary Key fields) in development and if the TR is moved to Quality and Production sytems, is there any possibility of loss in data will happen at Quality and Prd systems?
    At present, Table is having 20 fields with 2 primary key fields and i have to add 2 more primary key fields.
    I have checked in SCN and not find relevant threads.
    Please help me out.
    Regards,
    Suresh.

    NO . It wont be a problem .
    For ex :
    If you have VBELN  , POSNR are key fields now , you have an unique reord with that combination .
    If you add one other field in it  fo ex  VKBUR  then records will be like this
    VBELN     POSNR     VKBUR   MATERIAL   QTY
    10020      10                            abcxyz      1
    10020      10            1234        abcxyz     1
    So your previous records before adding new primary keys , will have new fields balnk , and the new records will have data filled up in all primary key fields .
    However , if you try to update the existing records that will be in existing PRIMARYKEY combination only .
    for example if you try update record 1 above with VKBUR value 85858 , it creates a new record , it wont be updated in existing record.
    Hope this helps , Pls let me know if u have any more doubts.

  • Default Primary Key Field of any database table

    hi,
    I am working on a database in which the data in the tables is generated from some other modules. I have to add, view and update functionalities to this table in the database. Unfortunately there is no primary key field for the table i am working on and as some existing modules are using this table i am not allowed to change the design of the table at this stage.
    Without primary i think its not possible to do updates. Because if all fields can have their values changed, then there will be a breakdown if the field value changes in the mid time when i had already retrieved the data to show on the screen, but not yet updated the value in the database. I hope you understood my problem.
    Please suggest solutions. I am not sure, but i think i read somewhere that every table created has a default primary associated whose value is always incresing with a new addtion of recored and its value never decreases. But i am unable to recollect the field name...i think it is some thing like[b] OID .... But i checked there is no such field name by OID. So please help me with some alternative solution...or by telling the default primary key field name.
    Thanx

    All the databases I know (namely Informix, PostgreSQL, SQL Server, even Access) have a row id column generated automatically.
    PostgreSQL example
    There is a way to read the value of this column; for example with PostgreSQL let�s say you have the following:
    CREATE TABLE no_id_column (
    column_one varchar(80),
    column_two varchar(80)
    INSERT INTO no_id_column(column_one, column_two) VALUES (�red�, �pink�);
    INSERT INTO no_id_column(column_one, column_two) VALUES (�yellow�, �orange�);Certainly, if we executed:
    SELECT * FROM no_id_column;Would obtain:
    column_one          column_two
    red               pink
    yellow               orangeBut if we modify the query
    SELECT  oid, * FROM no_id_column;We magically obtain a row identificator
    oid          column_one          column_two
    21569          red               pink
    21570          yellow               orangeThe data in the oid column is generated automatically by the database manager. Every time we insert a row we�ll have a different one. Just take into account that if the database contains a large amount of data, the oid could cycle.

  • Concatenate Primary Key Fields of an internal table into a String.

    Hi,
    I have a dynamic internal table created.
    In the dynamic internal table,
    How to concatenate all the primary keys of that row concatenated into a string and non primary keys into a different string.
    Can some one help me on this.
    E.g:
    Itab1 has 3 Primary fields and 3 Non primary key fields and it has 2 records.
    Table     col1     col2     col3     col4     col5     col6
    Row1     AA     AB     AC     1     2     3
    Row2     ZA     ZB     ZC     1     2     3
    The following is needed.
    Itab2 will have the concatenate strings
                       Key                               Nkey
    Row1        AAABAC                      010203
    Row2        ZAZBZC                       010203
    Thanks,
    Chaithanya

    C,
    Try something like this -  Use an ASSIGN in a LOOP:
      data: lv_PK type string.
      data: lv_non_PK type string.
      field-symbols: lv_str type string.
      assign local copy of initial line of gt_table to <ls_table>.
      loop at gt_table.  " this is your table.
        do n times.  " n = 6 in your case
          if n < 4.
             assign component sy-index of structure <ls_table> to <lv_str>.
             concatenate <lv_str> to lv_PK.
       else.
             assign component sy-index of structure <ls_table> to <lv_str>.
             concatenate <lv_str> to lv_Non_PK.
         endif.
        enddo.
        append <ls_table> to <gt_table>.
      endloop.

  • Assigning primary key and index for a table

    I have a database consisting of only one table with 10 million rows which mostly looks like this:
    RECORDDATE                     ID     CLASS     VALUE
    24-JAN-12 10.52.47.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     10     156
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     10     156
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     3     0
    24-JAN-12 10.52.48.000000 AM     96     6     38
    24-JAN-12 10.53.05.000000 AM     253     16     197
    24-JAN-12 10.53.06.000000 AM     98     10     150
    24-JAN-12 10.53.06.000000 AM     98     0     0
    24-JAN-12 10.53.06.000000 AM     98     4     0
    24-JAN-12 10.53.06.000000 AM     98     11     33As you can see there are several entries that look exactly the same. Currently, I don't have primary key or index for any column and have a lot of performance issues. For example this query takes more than 10 seconds to run:
    select distinct      ID
    from      scdatabase4
    where ID < 253
    order by 1Since database is not my primary job and have no background of it, I'm really confused about what to do to fix my issues. Could someone please help me in assigning primary key and index if you agree that this is the problem?!

    Execute the query below to help decide what column to index:
    SELECT COLUMN_NAME, NUM_DISTINCT, NUM_NULLS, NUM_BUCKETS, DENSITY
    FROM DBA_TAB_COL_STATISTICS
    WHERE TABLE_NAME = 'your_table_name'
    ORDER BY COLUMN_NAME;
    The important columns are:
    1) NUM_DISTINCTS: Indicates the number of distinct values. If this number is very low for a column, it indicates that this column is not a very good candidate for a B-Tree index.
    2) NUM_NULL: Indicates the number of null values for each column. A column with few null values is a good candidate for a index
    But be aware, this is not a rule, it's just a method to help decide which column will have the most benefit of index creation.

  • How add primary key constraint to already existing table with data

    I want apply primary key constraint to already existing table with data
    is there any command or way to do

    Alternatively, assuming you want to ensure uniqueness in your primary key column you can do this:
    alter table <table name> add constraint <cons name> primary key (col1,col2) exceptions into <exception_table>
    If the altter table statement fails this will populate the EXCEPTIONS table with the rows that contain duplicate values for (col1,col2).
    You will need to run (or get a DBA to run) a script called UTLEXCPT.SQL (which will be in the $ORACLE_HOME/rdbms/admin directory) if you don't already have an EXCEPTIONS table.
    Cheers, APC

  • How many primary keys for one table?can we add more primary keys

    In general Table have one  primary key.is it possible to more than one primary key in a table?(ie is it possible to add more than one pirmary key in a table). Help me out.

    pls do check this link
    [http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ea0b446011d189700000e8322d00/frameset.htm]
    All the key fields of a table must be stored together at the beginning of the table. A non-key field may not occur between two key fields.
    A maximum of 16 key fields per table is permitted. The maximum length of the table key is 255.
    If the key length is greater than 120, there are restrictions when transporting table entries. The key can only be specified up to a maximum of 120 places in a transport. If the key is larger than 120, table entries must be transported generically.

  • How to get the primary key names right for child tables?

    I have a logical model with a parent table and two child tables. The engineering strategy is "table per child". The parent has an primary key attribute. This is a screen shot:
    https://lh5.googleusercontent.com/-iKMtA3Say5c/UIkG1iktgEI/AAAAAAAAAtc/mrwFeHm4gi4/s800/child_pk_log.png
    When I engineer the model I get two primary keys with the same name name, which is the name of the parent:
    https://lh3.googleusercontent.com/-N88a9VwoPKw/UIkG1spbXpI/AAAAAAAAAtY/eonf8WdUZ6I/s800/child_pk_rel.png
    The correct names would be CHILD1_PK and CHILD2_PK. I can change the relational model by applying the naming rules but the next engineering will trash the names again.
    How can I fix this?

    Hi,
    the problem with PK name is fixed in Data Modeler 3.2.
    You can change PK name in relational model it won't be changed on next engineering
    Philip

  • How many Sequence-Tags are allowed in one BPEL-File?

    Hello!
    I have read that only one Sequenze-Tag per BPEL-File is allowed. If I need more acticvities I should use scopes inside the Sequenze-Tag. Is this true? Actually I am working on a BPEL-File which contains two more Sequenze-Tags inside the all-embracing Sequenze-Tag. Is this legal?

    if you look into the bpel schema, which can be found here
    http://schemas.xmlsoap.org/ws/2003/03/business-process/
    and look at this here
    - <complexType name="tProcess">
    - <complexContent>
    - <extension base="bpws:tExtensibleElements">
    - <sequence>
    <element name="partnerLinks" type="bpws:tPartnerLinks" minOccurs="0" />
    <element name="partners" type="bpws:tPartners" minOccurs="0" />
    <element name="variables" type="bpws:tVariables" minOccurs="0" />
    <element name="correlationSets" type="bpws:tCorrelationSets" minOccurs="0" />
    <element name="faultHandlers" type="bpws:tFaultHandlers" minOccurs="0" />
    <element name="compensationHandler" type="bpws:tCompensationHandler" minOccurs="0" />
    <element name="eventHandlers" type="bpws:tEventHandlers" minOccurs="0" />
    <group ref="bpws:activity" />
    </sequence>
    it means max one activity .. and in a scope as shown here
    - <complexType name="tScope">
    - <complexContent>
    - <extension base="bpws:tActivity">
    - <sequence>
    <element name="variables" type="bpws:tVariables" minOccurs="0" /> <element name="correlationSets" type="bpws:tCorrelationSets" minOccurs="0" />
    <element name="faultHandlers" type="bpws:tFaultHandlers" minOccurs="0" />
    <element name="compensationHandler" type="bpws:tCompensationHandler" minOccurs="0" />
    <element name="eventHandlers" type="bpws:tEventHandlers" minOccurs="0" />
    <group ref="bpws:activity" />
    </sequence>
    <attribute name="variableAccessSerializable" type="bpws:tBoolean" default="no" />
    </extension>
    </complexContent>
    </complexType>
    the same .. in a sequence shown below
    - <complexType name="tSequence">
    - <complexContent>
    - <extension base="bpws:tActivity">
    - <sequence>
    <group ref="bpws:activity" maxOccurs="unbounded" />
    </sequence>
    </extension>
    </complexContent>
    </complexType>
    0 -> many
    Bottom line, one activity within a process, one activity per scope. n activities within a sequence
    htc clemens

Maybe you are looking for

  • Get all invoices from the system and their details

    Hello Experts, Whats the most efficient FM to use for getting all the invoices in the system with details to transfer them to an external system? Should I get a list of all invoices and then call BBP_PD_INV_GETDETAIL on each? Thanks,

  • Verizon iPhone 4S stopped being able to receive SMS messages last night.  Any ideas?

    My wife and I have had our iPhone 4S's since they first became available in 2011.  Up until last night we had not had any issues.  All of a sudden a couple of our relvatives called us and said they could not send us text messages, they were getting N

  • TIN, CST and CGST number on Customer Invoice Print out

    Dear Gurus, kindly let me know the Table and fields name, from where I can fetch these details on my Customer Invoice. as these details I would like to show on my Customer Invoice Printout. TIN no. CST no. CGST no. Wishes, Abhishek

  • Running SCM 5.0 transactions via winGUI: problems with /SAPAPO/SDP94

    I am able to access the following system fron winGUI 640 System-ID: HU8 Client: 800 Application type: SAP SCM 5.0 Application Server: iwdf2053.dmzwdf.sap.corp System No.: 02 but when I try to launch the "interactive demand planning" (transaction /SAP

  • Can not close web browser in N8

    Hi all I have a N8 with the latest pr1.1 FW. Since pr1.1 sometimes browser gets blocked and can not be closed with the task switcher. The only solution that I have is to restart the phone. Is someone experiencing this? Is there a fix?  Best regards C