Skip to Main Content

Passing a parameter value for like contd..

palkodiAug 23 2018 — edited Aug 23 2018

create table ter (ID number, category varchar2(250 byte), name varchar2(250 byte) );

insert into ter values (1, 'amd-visual theraphy','john');

insert into ter values (1, 'amd-visual theraphy','mike');

insert into ter values (2, 'amd-autmatic theraphy','mike');

insert into ter values (3, 'amd-autmatic theraphy','drane');

insert into ter values (3, 'cmd autmatic theraphy', 'traverse');

insert into ter values (3, 'amd-dramatic theraphy','drane');

insert into ter values (3, 'cmd-dropertic theraphy', 'traverse');

insert into ter values (5,'qwd-aromatic-theraphy','drones');

passing parameter value for like 

I got a solution from @"Frank Kulash" now my question  is if

select  id, category, name

from    ter

where   category  like '%&category%'

i get the category and if i don,t provide any category i want to display the other results which are not in visual and autmatic category

version

Oracle Database 12c  12.1.0.2.0

This post has been answered by Frank Kulash on Aug 23 2018
Jump to Answer
Comments
Post Details
Added on Aug 23 2018
4 comments
105 views