Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
1.7k views
in Information Technology by (55.0k points)
closed by

Write the SQL functions which will perform the following operations:

i) To display the name of the month of the current date .

ii) To remove spaces from the beginning and end of a string, “ Panorama “.

iii) To display the name of the day eg, Friday or Sunday from your date of birth, dob.

iv) To display the starting position of your first name(fname) from your whole name (name).

OR

Consider a table SALESMAN with the following data:

Write SQL queries using SQL functions to perform the following operations:

a) Display salesman name and bonus after rounding off to zero decimal places.

b) Display the position of occurrence of the string “ta” in salesman names.

c) Display the four characters from salesman name starting from second character.

d) Display the month name for the date of join of salesman

1 Answer

+1 vote
by (54.6k points)
selected by
 
Best answer

i) monthname(date(now()))

ii) trim(“ Panaroma “)

iii) dayname(date(dob))

iv) instr(name, fname)

OR

i) Select sname, round(bonus,0) from Salesman;

ii) Select instr(Sname, “ta”) from Salesman;

iii) Select mid(Sname,2,4) from Salesman;

iv) Select monthname(DateofJoin) from Salesman;

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...