table name: prod there are three fields in the table that are
1.proddate
2.prodQty
3.model
Day wise prodQty is stored in the table prod
write a query to display total prodqty in the year 2004 april.
Answers were Sorted based on User's Feedback
Answer / ajit
SELECT SUM(PRODQTY) FROM EMP WHERE TO_CHAR(PRODDATE,'MON-YYYY')='APR-2014';
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sunnil
select sum(prodqty) from emp where to_char('proddate','yyyy')=2014 and to_char('proddate','mm')=04;
Is This Answer Correct ? | 1 Yes | 1 No |
Hi Everyone, How to get fist and last record from a table in oracle? Thanks in advance
How can we debug in PL/SQL?
What is java sql driver?
what is a cursor? : Sql dba
What is varray in pl sql?
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 does pl sql developer do?
Why is sql better than hql?
How many tables can you join in sql?
What are all the different normalization?
Is primary key is clustered index?
What will be the output of this Query? select to_char(trunc(add_months(sysdate-3),mm),mm/dd/yyyy) from dual