Computer Science, asked by hello1231886, 22 hours ago

Question: Write SQL Queries for Questions 1 to 16 and Output for Questions 17 to
20.
Queries:
1. Write an SQL query to fetch “FIRST_NAME” from Worker table using the
alias name as <WORKER_NAME>.
2. Write an SQL query to fetch unique values of DEPARTMENT from Worker
table.
3. Write an SQL query to print all Worker details from the Worker table order
by FIRST_NAME Ascending.
4. Write an SQL query to print details of Workers with the first name as
“Vipul” and “Satish” from Worker table.
5. Write an SQL query to print details of workers excluding first names,
“Vipul” and “Satish” from Worker table.
6. Write an SQL query to print details of Workers with DEPARTMENT name as
“Admin”.
7. Write an SQL query to print details of the Workers whose FIRST_NAME
contains ‘a’.
8. Write an SQL query to print details of the Workers whose FIRST_NAME
ends with ‘h’ and contains six alphabets.
9. Write an SQL query to print details of the Workers whose SALARY lies
between 100000 and 500000.
10. Write an SQL to increase the salary by 15 %
11. Write a query to add a column address of datatype varchar with size 30
12. Write an SQL query to display first names of workers who have been given
a bonus
13. Remove the Worker whose worker_id is 007 ,who has left the organisation.
14. Write a query to display all the information of Accounts department.
15. Write a query to drop the primary key
16. Write a sql command to view the structure of the table
17. Select First_name ,Department from Worker where Department = ‘HR’ and
First_Name like %a;
18. Select * from Worker where Salary <80000 AND Department = ‘Account;
19. Select First_Name,Last_Name, ” belongs to”, department ,”Department”;
20. Select 4*5 from Dual;

Answers

Answered by harshwardhanyadav140
0

Answer:

SQL add column is used to add column operation into the existing SQL table.

...

If we want to add multiple columns to the existing table using any single statement, we can use the below syntax:

ALTER TABLE table_name (Name of the table)

ADD [COLUMN] column_definition, (for adding column)

ADD [COLUMN] column_definition,

Explanation:

please mark me as brilliant

Similar questions