Just wanted to share how we can incorporate single quote in postgresql plpgsql.
Say i want dynamic query like select id from emp where empname ilike 'Rahul Teni' and age > 25
name:='Rahul Teni'
query:= 'select id from emp where empname ilike' ||''''||name||''''||'and age >25'
I hope this helps and saves your lot's of time.
No comments:
Post a Comment