Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql left characters

-- For Oracle only

-- syntax 
SUBSTR(<main-string>,1,<number-of-characters>)

-- example 
SUBSTR('Useless stuff',1,10) -- OUTPUT: Useless st

-- practical example
SELECT SUBSTR('Useless stuff',1,10)
FROM DUAL;
Comment

sql right characters

-- For Oracle only

-- syntax 
SUBSTR(<main-string>,-<number-of-characters>)

-- example 
SUBSTR('Useless stuff',-9) -- OUTPUT: ess stuff

-- practical example
SELECT SUBSTR('Useless stuff',-9)
FROM DUAL;
Comment

PREVIOUS NEXT
Code Example
Sql :: postgresql append array 
Sql :: how to change the auto increment in existing table mysql 
Sql :: how to put value in variable mysql 
Sql :: postgresql concatenate multiple rows into one row 
Sql :: sum query in sql 
Sql :: mysql shell clear screen 
Sql :: check if a column is a primary key in sql server 
Sql :: psql select database 
Sql :: how to delete the rows with null values in mysql 
Sql :: create function syntax sql server 
Sql :: delete database mysql command 
Sql :: mysql delete duplicates 
Sql :: 3rd highest value in sql 
Sql :: sqlalchemy update row 
Sql :: sql end of month 
Sql :: postgres duplicate key value violates unique constraint already exists 
Sql :: mysql age by birthdate 
Sql :: postgresql delete multiple rows 
Sql :: SQL Server Altering Column to be Unique 
Sql :: Write an SQL query to print details of the Workers who have joined in Feb’2014 
Sql :: oracle index size 
Sql :: increment integer in table sql 
Sql :: mysql date format 
Sql :: create temporary table sql 
Sql :: SQL Add Column in a Table 
Sql :: select random sample sql 
Sql :: sql find second highest salary employee 
Sql :: get initial in sql 
Sql :: function in postgresql 
Sql :: how to pass dynamic column name in sql query 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =