Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 . Ans.

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

What is a job analysis?

Answered: 1 week ago

Question

Question What is a Roth 401(k) feature?

Answered: 1 week ago