what is thae main difference between foreingkey and
primarykey
Answers were Sorted based on User's Feedback
Answer / bishwajit
Primary key is unique key but foriegn key always refers to
primary key
primary key is not NULL and
foreign key is NULL
Is This Answer Correct ? | 9 Yes | 1 No |
Answer / neel
Primary key is unique key that uniquely identifies each data
in a table (t1) whereas foreign key is the key that acts as
Primary key for some other table (t2) and is a part of the
table that contains Primary key (t1).
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / surya
a primary key is used to indicate uniqueness of all the rows
in the table
where as the foreign key is used to refer other table from
the current table
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / nageswararao.k
primary key:- A primary contains unique and notnull.it means
a primary key column does not contain nullvalues and
duplicates.A table containe only one primary key.using this
we can access the data from table easily.
foreign key:-a fk can contain duplicate values but it not
contain null values.using fk to establish relationship
between two tables. a parent table primary key should be
referenced by child table primary key.
one fk should be referenced by only one primary key
the main difference between two keys is
pk is used to access the data from table.
fk is used to establish the relationship between two tables.
pk does not allowed duplicate and null values.
fk can allows duplicate values and does not allowed null
values
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / karthik
primary key:a primary key is combination of unique,and not
null constraint and a table can have only one primary key
foreign key ;
a foreign key is a reference of the primary key and returns
reference from itself or from other table data
Is This Answer Correct ? | 1 Yes | 1 No |
what is normalization
REGULAR CLASSES for Informatica 8.6 is starting from Monday, 07th Nov, 8:00 AM IST .
what are collection attributes
I have table that has student names in it.If I query on the names my result set should return as 'VALUE NOT ENTERED' for null entries.
i want to know rdbms certification details and syallabus and for whom i contact for rdbms certification in bangalore i need answer very urgent please mail to aniltelkar50@gmail.com please as soon as possible
what is difference between sap and oracle applications and which is now market leader?
11 Answers Amity, Infosys, Rysigo, Unilogic Software, Wipro,
what is difference between sqlserver and oracle?
in fun why return single value?
can we use a having cluase in groupby clause. if there are 500 records i will give rownumber<250 then how many records does it retrieve. wt is the result of nvl2(null,notnull,null) if there are four tables without using cartesian how many joins can be there. in the sql subqueries wt is the parent ans1)select 2)update,3) delete 4)2&3
what is thae main difference between foreingkey and primarykey