Skip to content

Tag: oracle

oracle sql max value

i have a requirement, i need to find max only one val from each department,i need only one value even 2 person have same max value drop table tst; create table tst(val number,dept varchar2(20),name …

Sort alphanumeric ID number

I have a database that every transactions get a alphanumeric ID. By when I write my query and use Order by it give me a wrong sequence. For example: TRN_ID TRNDTE 000002DAAW 2020-09-12 03:45:24 …

not in in select query

I have similar query in my project. I have been told to find other way to remove not equal to, because index is not used if you do so. I have no other filter condition, can I do some work around to fool optimizer? Answer I have been told to find other way to remove not equal to, is generally

CASE (IF ELSE )

if else statement in oracle with condition Answer What you posted doesn’t make sense; as if that CASE was supposed to be in the WHERE clause, e.g.