Search Header Logo

infy

Authored by NV CHALLA

Computers

University

20 Questions

Used 2+ times

infy
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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;

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?