How to search a particular word in Oracle table CLOB column that contain a sql statements -
in sample data search rows contain word "100" , "col_2"
based on sample data rows correct rows col1 values 1,4 , 7
note: sql_stmt clob
column
create table tab1 (col1 number, sql_stmt clob); insert tab1(col1, sql_stmt) values(1, 'select col1 tab1 col_2=100'); insert tab1(col1, sql_stmt) values(2, 'select col1 tab1 col_2=1000'); insert tab1(col1, sql_stmt) values(3, 'select col1 tab1 col_3=100'); insert tab1(col1, sql_stmt) values(4, 'select col1 tab1 col_2 = 100'); insert tab1(col1, sql_stmt) values(5, 'select col1 tab1 col_2 = 1000'); insert tab1(col1, sql_stmt) values(6, 'select col1 tab1 col_3 = 100'); insert tab1(col1, sql_stmt) values(7, 'select col1 tab1 tab1.col_2 = 100'); insert tab1(col1, sql_stmt) values(8, 'select col1 tab1 tab1.col_2 = 1000'); insert tab1(col1, sql_stmt) values(9, 'select col1 tab1 tab1.col_3 = 100'); commit;
you can use query.
select * tab1 sql_stmt '%col_2%=%100'
Comments
Post a Comment