Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

get first 3 letters in sql

-- substr(string, start, [, length ])
SELECT substr('Hello World', 1, 3) ;      -- Hel
SELECT substr('Hello World', 4, 5) ;      -- lo Wo
SELECT substr('Hello World', 4);          -- lo World
SELECT substr('Hello World', -3);         -- rld
 
PREVIOUS NEXT
Tagged: #letters #sql
ADD COMMENT
Topic
Name
2+1 =