Obtenga las primeras 3 letras en SQL
SELECT FIRST_NAME , SUBSTR(FIRST_NAME, 1 , 3 ) , LENGTH(FIRST_NAME)
FROM EMPLOYEES ;
Obedient Ocelot
SELECT FIRST_NAME , SUBSTR(FIRST_NAME, 1 , 3 ) , LENGTH(FIRST_NAME)
FROM EMPLOYEES ;
SELECT SUBSTRING('SQL Tutorial', 1, 3) AS ExtractString;
Select First two Character in selected Field with Left(string,Number of Char in int)
SELECT LEFT(FName, 2) AS FirstName FROM dbo.NameMaster
-- 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
SELECT
SUBSTRING('SQLTutorial.org',
POSITION('.' IN 'SQLTutorial.org'));
SELECT * FROM <Table> WHERE LEFT(<columnName>,1) = "s";