Write a pl/sql script to display the following series of numbers: 99,96,93……9,6,3?
Answer / bhavya
Select
Listagg(rownum*3, ', ') within group (order by rownum desc)
From dual
Connect by level<=100/3;
| Is This Answer Correct ? | 6 Yes | 1 No |
declare v_count number(8,3); v_sal scott.emp.sal%type := '&P_sal'; cursor cur_name is select sal from scott.emp where sal between (v_sal-100) and (v_sal +1000); begin v_count :=nvl(sql%rowcount ,0); if v_count = 0 then dbms_output.put_line('no records are fetch in the given sal range'); else dbms_output.put_line('There is/are '||to_char(v_count)|| ' salaries are selected in the given range '); end if; end; in the above programm .....for any sal range ....always it shows the following message.. no records are fetch in the given sal range please find the mistake and share with me...with thansk and regards..sarao....
What is a column in a table?
What does count (*) mean?
What is partition by in sql?
What is ROWID?
What is the difference between sql/pl-sql/embeded sql?
What is the result, when NULL is compared with NULL?
how to use like conditions? : Sql dba
What is the maximum number of columns in sql table?
what are the types of join and explain each? : Sql dba
what is autonomouse transaction?
What is $$ in sql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)