top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Left and Right functions in SQL?

+3 votes
478 views
Left and Right functions in SQL?
posted Jan 13, 2014 by Atul Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
What is the Query? Looks you have missed something...

2 Answers

0 votes

Left and Right are inbulid functions in SQL.

While Right gives character from Right side of a string, Left give string from Left side.

Select Left('your name',4)
Ans- your

Select Right('your name',4)
And- name

answer Jan 15, 2014 by Neeraj Pandey
0 votes

These functions return the left and right parts of a string. The syntax for the LEFT function is:

LEFT(CUSTNAME,6)

For the two customers, the leftmost 6 characters are:

"Mr. Ti"

"Mrs. E"

The space between the period and the first name counts as a character.

The RIGHT function has exactly the same syntax:

RIGHT(CUSTNAME,5)

and returns the values

"Woods"

"Woods"

answer Nov 20, 2014 by Manikandan J
...