infy

infy

University

20 Qs

quiz-placeholder

Similar activities

Normalization of Data Quiz

Normalization of Data Quiz

12th Grade - University

18 Qs

QUIZ 3 - DFC2083

QUIZ 3 - DFC2083

University

15 Qs

Database Design

Database Design

University

16 Qs

DBMS_Quiz_1

DBMS_Quiz_1

University

15 Qs

Bab 3 ERD

Bab 3 ERD

University

18 Qs

DDL

DDL

University

15 Qs

SEMIFINAL EXAM IN INFORMATION MANAGEMENT_BSIT 2A

SEMIFINAL EXAM IN INFORMATION MANAGEMENT_BSIT 2A

University

16 Qs

SQL query quiz

SQL query quiz

University

20 Qs

infy

infy

Assessment

Quiz

Computers

University

Hard

Created by

NV CHALLA

Used 2+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. Which SQL command creates a table named Employees with columns EmpID (integer) and EmpName (varchar 50)?

CREATE TABLE Employees (EmpID INT, EmpName VARCHAR(50));

CREATE Employees TABLE (EmpID INT, EmpName VARCHAR(50));

TABLE CREATE Employees (EmpID INT, EmpName VARCHAR(50));

CREATE TABLE Employees (EmpID VARCHAR(50), EmpName INT);

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. How to add a new column JoiningDate of type DATE to the Employees table?

CREATE TABLE Employees (JoiningDate DATE);
UPDATE Employees SET JoiningDate = CURRENT_DATE;
ALTER TABLE Employees ADD JoiningDate DATE;
ALTER TABLE Employees ADD COLUMN JoiningDate;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3. What will this query do? DELETE FROM Employees WHERE EmpID = 100;

It removes the employee with EmpID 100 from the Employees table.
It updates the employee's details with EmpID 100 in the Employees table.
It adds a new employee with EmpID 100 to the Employees table.
It retrieves the employee with EmpID 100 from the Employees table.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4. How do you rename the column EmpName to EmployeeName in the Employees table?

UPDATE Employees SET EmpName = 'EmployeeName';
RENAME TABLE Employees TO NewEmployees;
ALTER Employees CHANGE EmpName EmployeeName;
ALTER TABLE Employees RENAME COLUMN EmpName TO EmployeeName;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5. Which query inserts a new employee with EmpID = 10 and EmpName = 'Rahul'?

INSERT INTO Employees (EmpID, EmpName) VALUES (10, 'Rahul');
INSERT Employee VALUES (10, 'Rahul') INTO Employees;
ADD Employee (10, 'Rahul') TO Employees;
INSERT INTO Employees (EmpID, EmpName) SET (10, 'Rahul');

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6. What will this query do?

UPDATE Employees SET EmpName = 'Sonia' WHERE EmpID = 5;

It retrieves the name of the employee with EmpID 5.
It updates the name of the employee with EmpID 5 to Sonia.
It adds a new employee named Sonia.
It deletes the employee with EmpID 5.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7. How to delete all data from Employees without deleting the table?

TRUNCATE Employees;
DROP TABLE Employees;
DELETE * FROM Employees;
DELETE FROM Employees;

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?