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 :: get triggers by query 
Sql :: mongodb vs mysql 
Sql :: SQL LIMIT With OFFSET Clause 
Sql :: get duplicate entry sql 
Sql :: sqlalchemy get schema from database 
Sql :: sql select non unique 
Sql :: sql inserted 
Sql :: How to get last inserted primary key in SQL Server 
Sql :: oracle create table as select 
Sql :: group by clause with join in sql 
Sql :: SQL BACKUP DATABASE for SQL Server 
Sql :: oracle generate list of dates in between a date range 
Sql :: sql count more than 1 
Sql :: add column alter table default value 
Sql :: mssql procedure 
Sql :: sql tabelle erstellen 
Sql :: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: 
Sql :: set mysql password 
Sql :: SQL add a totals of differemt rows of the same id 
Sql :: postegresql update to null 
Sql :: top 3 salary in sql 
Sql :: mysql two joins 
Sql :: order by number of character in sql 
Sql :: to show sp in sql server 
Sql :: full outer join postgres 
Sql :: docker hub mysql 
Sql :: mysql select inside sum 
Sql :: mysql count 
Sql :: insert multiple rows from another table sql 
Sql :: generate series sybase 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =