DBMS Part 2
DBMS Part 2
DBMS Part 2
FOREIGN KEY:- The foreign key identifies a column or set of columns in one
(referencing) table that refers to a column or set of columns in another
(referenced) table.
INSERT INTO
VEHICLE(‘1234’,’TATA’,’201’,’
2020’,’5000.25);
CREATING TABLE IN MYSQL Through Create table command we can define
any table.
Syntax :CREATE TABLE ([()],.......... );
CREATE TABLE info(Sno integer, Name varchar(10), City char(10), Age integer,
Company varchar(20), Salary decimal(8,2));
INSERT : This statement is used to insert new records into the table.
INSERT INTO Employee_Info VALUES ('02', 'Anay','Soumya', '9432156783', '
Marathalli House No 23', 'Delhi', 'India');
INSERT : This statement is used to insert new records into the table.
INSERT INTO
Employee(Emp_code,Emp_Name,Emp_Address,Emp_Designation,Emp_C
ontact,Emp_Salary) VALUES('E021', 'PRASHANT', 'KUWAIT CITY',
'DOCTOR', '123455', '1234.89');
For example, if you want to display all the data from table emp (short
form of employee), the command is
b. Relational
c. Single File
d. One File
b. Web Server
c. Database Server
b. Primary Key
c. Composite Key
d. Alternate Key
Which of the following field of table “Book” can act as primary key?
a. Book_number
b. Subject
c. price
d. Author_name
When primary key is made up of two or more columns then it is called
__ primary key.
a. Mixed
b. Reference
c. Composite
d. Compost
b. False
CREATE TABLE BANK( ID_Number INTEGER(10) Primary Key,Name varchar(20),B_date
date,Address varchar(50));