select * from user_source where type = ‘PROCEDURE’ and lower(text) like lower(‘%text%’);
How to find text in oracle stored procedure
select * from user_source where type = ‘PROCEDURE’ and lower(text) like lower(‘%text%’);
Practise makes perfect
Oracle decode function allow to transform data values at retrieval time.
DECODE(expr, search, result
[, search, result ]...
[, default ]
)
We have a column named Floor, with values of GF, FF, SF and TF. When we run SQL queries, we want to transform these values into Ground Floor, First Floor, Second Floor and Third Floor.
select
decode (
floor,
‘GF’,’Ground Floor’,
‘FF’,’First Floor’,
‘SF’,’Second Floor’,
‘TF’,’Third Floor’,
‘NOT KNOWN’
)
from
apartment;
TRUNCATE
COMMENT
Update Statement is used to modify existing rows in table.
Below is Update State Syntax :
In the syntax:
INSERT statement is used to add new rows to table.
Syntax of INSERT statement below :
Only one row can be inserted at a time with this syntax.
INSERT statement can also be used for copying rows from another table.
Syntax below :
INSERT INTO table1 ( column11 , column12 , ….. )
SELECT column21 , column22 , …….
FROM
table2
Example below :