Computer Science, asked by shagunkatiyar2004, 10 months ago

define the following : Table :primary keys,foreign key​

Answers

Answered by sharmahimani55
201

Answer:

Table --- A table is a arrangement of data in rows and columns.

Primary key ---- A primary key is a column or a group of column in a table that uniquely identifies the rows in that table.

Foreign key ---- A foreign key is a column or group of column in a relational database table that provide a link between data in two tables.

Hope it helps.

plzzz mark as brainiest..

Answered by rk9506863
21

Explanation of Table :primary keys, foreign key​

Explanation:

In SQL DBMS there are various keys and commands used:

Primary Key

Primary key is defined as column or set of columns where every value is unique and identified in a single row of a table. Primary key can identify the each record in the table uniquely.

Primary key contain only unique values

Primary key can not be Null in any case

Foreign Key:.

The purpose of this foreign key is used to link two tables together. Foreign key is the collection of field in a table that refers to Primary Key in another table.

Example

CREATE TABLE  Serve (

   ServeID int NOT NULL,

   ServeNumber int NOT NULL,

   PersonsID int,

   PRIMARY KEY (ServeID),

   FOREIGN KEY (PersonsID) REFERENCES Personss(PersonsID)

);

Similar questions