Sql Server Interview Questions and Answers Part 1

1) Display the names of the students in Uppercase.
    SQL > select upper(sname) from student

2) Display the names of the students in Lowecase.
    SQL > select lower(sname) from student

3) Display the names of the students in Propercase.
    SQL > select initcap(sname) from student

4) Display the length of student name using appropriate function.
    SQL > select length('sname') from student

5) Display the length of all the student names.
    SQL > select length(sname) from student

6) select name of the student concatenate with student number.
    SQL > select sname||rollno from student

7) Use appropriate function and extract 7 characters starting from 6 characters from the following  string 'dotnetqueries'. i.e the out put should be 'queries'.
   SQL > select substr('dotnetqueries',7,6) from dual


Receive Quality Tutorials Straight in your Inbox by submitting your Email below:

Delivered by FeedBurner

Protected by Copyscape Duplicate Content Checker