Question
Make sure those querys work in SQL SERVER Q-9. Write An SQL Query To Print The FIRST_NAME From Worker Table After Replacing A With A.
Make sure those querys work in SQL SERVER
Q-9. Write An SQL Query To Print The FIRST_NAME From Worker Table After Replacing A With A. Ans.
The required query is:
Select REPLACE(FIRST_NAME,'a','A') from Worker;
Q-10. Write An SQL Query To Print The FIRST_NAME And LAST_NAME From Worker Table Into A Single Column COMPLETE_NAME. A Space Char Should Separate Them. Ans.
The required query is:
Select CONCAT(FIRST_NAME, ' ', LAST_NAME) AS 'COMPLETE_NAME' from Worker;
Q-11. Write An SQL Query To Print All Worker Details From The Worker Table Order By FIRST_NAME Ascending. Ans.
The required query is:
Select * from Worker order by FIRST_NAME asc;
Q-12. Write An SQL Query To Print All Worker Details From The Worker Table Order By FIRST_NAME Ascending And DEPARTMENT Descending. Ans.
The required query is:
Select * from Worker order by FIRST_NAME asc,DEPARTMENT desc;
Q-13. Write An SQL Query To Print Details For Workers With The First Name As Vipul And Satish From Worker Table. Ans.
The required query is:
Select * from Worker where FIRST_NAME in ('Vipul','Satish');
Q-14. Write An SQL Query To Print Details Of Workers Excluding First Names, Vipul And Satish From Worker Table. Ans.
The required query is:
Select * from Worker where FIRST_NAME not in ('Vipul','Satish');
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started