Вы находитесь на странице: 1из 2

FUNCTIONS 1.Single Row functions(one o/p for each row) 2.

Multi Row functions(one o/p for group of rows) Single Row functions 1.Character 2.Number 3.Date 4.Conversion 5.Miscellanous Character Function a.Case manipulation ->Lower ->Upper ->Initcap b.Char manipulation ->Substr(col/string,start_from,end_at) ->Instr(col/string,char to search,start_from,occurence no) ->Trim(leading/trailing/both char from string) ->Replace(col/string,find this,replace with) ->Translate(col/string,find this,replace with) ->Lpad(col/string,size after padding,padd with symbol) ->Rpad(col/string,size after padding,padd with symbol) ->Length(String/col) ->ASCII(char) ->CHR(number) Number Function ->Round(Number,pt after/before decimal pt) ->Truncate(Number,pt after/before decimal pt) ->Mod(No,No) ->Ceil(No) ->Floor(No) ->Power(No,raise to) ->Sqrt(No) Date Function ->sysdate,systimestamp ->months_between(Date1,Date2)(Date1>Date2) ->add_months(Date,months to add) ->last_day(Date) ->next_day(Date1,search for day) ->round(Date,year,month,day,time<- default) ->truncate(Date,year,month,day,time<- default) Conversion Function YY to RR 39 39 89 89 49 99 49 99 ->to_char Date to char to_char(Date,format model) Format Model (Year,YYYY,YYY,YY,YY//RRRR,RR Month,Mon,MM

Day,Dy,DDD,Dd,D HH/HH24/HH12,MI,SS,AM/PM Sp,Th,Spth Cc,Scc Q) Number to char to_char(number,format model) Format Model-> $99,999.00 ->To_date(date,format model) format model->the format of date in 1st parameter ->to_number(No,Format model) format model->99... Miscellanous ->NVL(Col,replace with) ->NVL2(Col,replace with if not null,replace with if null) ->Nullif(col1,col2) ->Coalesce(col1,col2,col3.....) ->Case ->Decode