Question: SUBSTR is used in this format: SUBSTR ( column _ name, index, number _ of _ characters ) index is a number that denotes where
SUBSTR is used in this format: SUBSTRcolumnname, index, numberofcharacters
index is a number that denotes where you would start the substring. would indicate the first character, would indicated the second character, etc. The index could also be negative, which means you would count from the end of the string. would denote the last character, would denote the nd to last character, etc.
numberofcharacters is optional; if it is not included, the substring contains the "rest of the string".
Here are some examples:
SUBSTR name is the first characters of the name.
name, is the last characters of the name.
SELECT FROM robots WHERE SUBSTRname LIKE ; is another way of returning all of the robots that have been released between and
Note: In other versions of SQL you could use RIGHT to do this.
Can you return all of the robots that are located in NY
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
