18
Reply

What is happened when we create a field a primary key?

Manoj Kalla

Manoj Kalla

Jan 04, 2016
1.4k
1

    if primary key created internally clustered index will be created

    if primary key created internally clustered index will be created

    A primary key is a field in a table which uniquely identifies each row/record in a database table. Primary keys must contain unique values. A primary key column cannot have NULL values.A table can have only one primary key, which may consist of single or multiple fields. When multiple fields are used as a primary key, they are called a composite key.If a table has a primary key defined on any fields, then you can not have two records having the same value of that fields.

    Rafnas T P
    January 08, 2016
    1

    Primary key mustn't have Null values.And it can be an object of table that can be used in other tables.

    Joe Wilson
    January 07, 2016
    1

    Primary key is identification of record

    Mahesh Gawhane
    January 07, 2016
    1

    Clustered index will be created for that field.

    Manoj Kalla
    January 04, 2016
    1

    If we declare column name as primary key then that column will not accept null values.

    Khaja Moizuddin
    December 02, 2016
    0

    When creates a primary key then internally created clustered Index.

    Vijay Dhiman
    August 25, 2016
    0

    when you declare a column as primary then that column become clustered index key automatically

    sushil kumar
    June 08, 2016
    0

    when we create a field with primary key id Duplicate records in the table is avoided

    Melbin m p
    February 12, 2016
    0

    Primary key is a combination of unique key constraint and clustered index. Behind the scene, it cares of 2 things: It does not all NULL to be inserted into column and secondly, it takes care of physical ordering of Data. In data base when we create a Primary Key on any table for a specific column. If we go to Object Explorer, we can see a unique key and a clustered index has been added to table.However, it also include NOT NULL constraint along with Unique key constraint.

    Anil Kumar Murmu
    January 13, 2016
    0

    Primary key is a combination of unique key constraint and clustered index. Behind the scene, it cares of 2 things:It does not all NULL to be inserted into column and secondly, it takes care of physical ordering of Data.In data base when we create a Primary Key on any table for a specific column. If we go to Object Explorer, we can see a unique key and a clustered index has been added to table.

    Anil Kumar Murmu
    January 13, 2016
    0

    Primary key mustn't have Null values.And it can be an object of table that can be used in other tables.

    Kml Surani
    January 09, 2016
    0

    If we create a field with primary key that means ,we can not insert duplicate value and null value and by default clustered index is created on that field

    Mahaveer Yadav
    January 09, 2016
    0

    A primary key is a field in a table which uniquely identifies each row/record in a database table. Primary keys must contain unique values. A primary key column cannot have NULL values.A table can have only one primary key, which may consist of single or multiple fields. When multiple fields are used as a primary key, they are called a composite key.If a table has a primary key defined on any fields, then you can not have two records having the same value of that fields.

    Rafnas T P
    January 08, 2016
    0

    Primary key is used to identify records in table uniquely and it won’t allow null values and duplication of data. Only one primary key is allowed for each table.

    bharat aggarwal
    January 06, 2016
    0

    Only Not Null and Unique values are allowed in the field to which a primary key is applied.

    Jainish Shah
    January 06, 2016
    0

    to avoid duplicate value and it it identified unique value in table.

    manoj kumar
    January 06, 2016
    0