Viva Questions Ip
Viva Questions Ip
Ans:
a) Primary key: is a column in a table which is unique identity of every row. Only one primary key is allowed in a table.
Values in a primary key cannot be null and cannot be duplicate
example: admission number, adhar number
b) Candidate Key: All the columns which are eligible to become primary key are called candidate keys. There can be
more than one candidate keys in a table. Primary key is selected from candidate keys
c) Alternate key: All the candidate keys which could not become primary key are called alternate key
Q. What is MYSQL?
Ans: MYSQL is DBMS software
Q. What is SQL?
Ans: SQL is called Structure Query Language. It is language used inside MYSQL software
Q. What is a relation?
Ans: Relation is another name for a table.
Example:
1. Extract 5 characters starting from 2nd position from string “ORANGE AND APPLE”
SUBSTR(“ORANGE AND APPLE”, 2, 5)= RANGE
2. Extract 2 characters starting from 3rd position from string “LEARNING MYSQL”
MID(“LEARNING MYSQL”, 3, 2) = AR
DAY(“2019-09-12”) = 12
EXAMPLE:
DAYNAME(“2022-04-24”) = SUNDAY
Ex:
MONTH(2022-04-24) = 4
General Questions
Q. What is the difference between ALTER TABLE command and UPDATE command
Ans:
ALTER UPDATE
CREATE DATABASE INSERT INTO
CREATE TABLE SELECT
DROP TABLE DELETE
DROP DATABASE