Question
Make sure those QUERYS can work in SQL SERVER Q-1. Write An SQL Query To Fetch FIRST_NAME From Worker Table Using The Alias Name As
Make sure those QUERYS can work in SQL SERVER
Q-1. Write An SQL Query To Fetch FIRST_NAME From Worker Table Using The Alias Name As
The required query is:
Select FIRST_NAME AS WORKER_NAME from Worker;
Q-2. Write An SQL Query To Fetch FIRST_NAME From Worker Table In Upper Case. Ans.
The required query is:
Select upper(FIRST_NAME) from Worker;
Q-3. Write An SQL Query To Fetch Unique Values Of DEPARTMENT From Worker Table. Ans.
The required query is:
Select distinct DEPARTMENT from Worker;
Q-4. Write An SQL Query To Print The First Three Characters Of FIRST_NAME From Worker Table. Ans.
The required query is:
Select substring(FIRST_NAME,1,3) from Worker;
Q-5. Write An SQL Query To Find The Position Of The Alphabet (A) In The First Name Column Amitabh From Worker Table. Ans.
The required query is:
Select INSTR(FIRST_NAME, BINARY'a') from Worker where FIRST_NAME = 'Amitabh'; Notes.
The INSTR method is in case-sensitive by default. Using Binary operator will make INSTR work as the case-sensitive function.
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