Practical SQL training/exam question

Hello

I am a student at the bases SQL 1z0-051 exam, and examples of questions about the Oracle University site review is the following:

3. review the structure of the EMP table:

EMP                                      

Name                                  Null?                        Type

------------------------------------------------------------------------------------------

EMPNO NOT NULL NUMBER (3)

ENAME                                                               VARCHAR2(25)

SALARY                                                              NUMBER(10,2)

COMM_PCT                                                        NUMBER(4,2)

You want to generate a report which meets the following requirements:

1 shows the names of employees and the commission amounts

2 excludes employees who do not have a commission

3 displays a zero for the employees whose SALARY has no value

You run the following SQL statement:

SQL > SELECT ename, NVL (salary * comm_pct, 0)

WCP

WHERE comm_pct <>NULL;


What is the result?

It generates an error

B it runs successfully but displays no results

C it runs successfully but displays results that meet only the requirements 1 and 3

D it is running successfully and displays results which fulfil all the requirements

The answer provided on the Web site is: B it runs successfully but displays no results

and I don't understand why...


The WHERE clause excludes rows with comm_pct is NULL. So for the function NVL in the SELECT clause, the value of comm_pct will never be NULL, but salary * can * be NULL (there is no NULL constraint on this topic), so for lines where the salary is NULL, salary * comm_pct evaluate to NULL and the function NVL would transform these nulls to 0.


Am I missing something?  I realize that for some people on this forum, the answer may be obvious, but I'm learning just for the first level of certification SQL, so for now I still have a lot to discover.


Thanks in advance,

JM

x <> NULL

x = NULL

Neither is never true. NULL is never equal to what whatsoever (including NULL). NULL is also never not equal to what

X IS NOT NULL

X IS NULL

are the right way

http://docs.Oracle.com/CD/B19306_01/server.102/b14200/sql_elements005.htm

Tags: Database

Similar Questions

  • What is the best site for the 70-291 exam questions

    What is the best exam question for70-291 website

    Hello

    Your question is addressed in the forums for answers.

    Please ask this question in the following forum.

    Training and Certification Forum:

    http://social.technet.Microsoft.com/forums/en-us/CertGeneral/threads

    Concerning

  • can I see my exam questions?

    Hello world

    I want to study my mistakes of my exam 1Z0-899, that I took yesterday.  I see the summary of the sections where I was wrong, but better to concentrate my studies - is it possible for me to see the real exam questions to see what questions I answered wrong so I can understand these issues to the categories in my summary of the review?

    It's just my college experience, I always had the chance to see my exam questions.  Even for the final exams of the instructors at the University has generally make an appointment with students so that they can see their final exam questions and the mistakes they did.  It's just that I was in universities for too long and can't help but think this way.  So could I see my questions in the examination again please?

    Thank you kindly,

    Victor.

    You cannot resume a review for 14 days.  However, there is no limit to the number of attempts at recovery.

  • Difficulty of VCP4 exam question

    Hi all

    I'm studying for my VCP4 exam next week and had just a small question about the quality or the difficulty of the questions on the real exam. Basically, I was wondering if the simulated test questions and SLOG are representative of the actual exam questions? I used two of these resources and have received good results, but I don't want a rude shock when I get to the real deal!

    See you soon

    Welcome to the community.

    Some questions are at the same level difficult, others too easy...

    André

  • Certified Oracle SQL Expert Exam - 1Z0-047

    I plan on taking the exam 1Z0-047 and recently (in the last 3 weeks) bought the study guide / review of Kaplan for Oracle 11 g r2 for this test practice (or at least I thought it was up to and including Oracle 11 g r2).

    If I understand correctly what I read, it seems that questions for version 12 of the database are now included in this review.  There is apparently no separate examination that does not include the Oracle 12.  Is this correct, or can I still request a review for 11g r2?

    This is also true for PL/SQL and other exams (must study for any question 12 c)?

    Given that most of the developers I know is not yet up on 12 c, it seems that there should be at least an option of which version of the database you want to testify against.

    Everything / all thoughts are appreciated.

    Barry D.

    If I understand correctly what I read, it seems that the issues for version 12 of the database are now included in this review.  There is apparently no separate examination that does not include the Oracle 12.  Is this correct, or can I still request a review for 11g r2?

    I guess in what above, where you have "now", you want to say 'no '.

    No there is only one exam 1Z0-047.  The number of topics under review that are specific to Oracle 12 c is minimal.  I've updated my page on the contest of Expert SQL include articles on these topics, so you can prepare for them, even if the Kaplan materials do not yet cover them.

    Oracle Certification Preparation: Details of the examination and preparation for 1Z0 - 047 resources

    This is also true for PL/SQL and other exams (must study for any question 12 c)?

    The current reviews of PL/SQL (1Z0-144 and 1Z0-146) have not been updated to 12 c.  In my view, that the two have been validated against ut 12 c. which simply means that nothing they contain is wrong for 12 c - No 12 new c-specific features have been added.

  • The requirement for the 1Z0-053 exam question

    Recently, I took and passed my exam 1Z0-052. Glancing 1Z0 - 053; Oracle requires I attend one of their training courses. When I took my exam 1Z0-052 in the Center; one of the employees was trying to register for Oracle training. According to him, their classes meet the requirements of Oracle for exam 1Z0-053. However, the format of the class is different from the class, I took with Oracle University. (I had DB Oracle 10 g 1 Admin workshop with Oracle University - don't ask me why I didn't take the 1Z0-042 exam and finish on 1Z0 - 043; between work and life, the big procrastinator in me never capitalize on it).

    Anyway, my question is, has this guy to the centre-right? If I attend their training courses; It will satisfy the requirements of Oracle for exam 1Z0-053? Has anyone taken training outside of Oracle University and Oracle 1Z0-053 satisfaction requirements? Or can you please show me the link or point me to the right representing Oracle who can answer that?

    Any information is appreciated.

    Thank you.

    OracleNewbie828 wrote:
    Recently, I took and passed my exam 1Z0-052. Glancing 1Z0 - 053; Oracle requires I attend one of their training courses. When I took my exam 1Z0-052 in the Center; one of the employees was trying to register for Oracle training. According to him, their classes meet the requirements of Oracle for exam 1Z0-053. However, the format of the class is different from the class, I took with Oracle University. (I had DB Oracle 10 g 1 Admin workshop with Oracle University - don't ask me why I didn't take the 1Z0-042 exam and finish on 1Z0 - 043; between work and life, the big procrastinator in me never capitalize on it).

    Anyway, my question is, has this guy to the centre-right? If I attend their training courses; It will satisfy the requirements of Oracle for exam 1Z0-053? Has anyone taken training outside of Oracle University and Oracle 1Z0-053 satisfaction requirements? Or can you please show me the link or point me to the right representing Oracle who can answer that?

    Any information is appreciated.

    Thank you.

    Most of the information are generally available under http://certification.oracle.com with a bit of descent:

    The page key is:

    http://education.Oracle.com/pls/web_prod-PLQ-dad/db_pages.GetPage?page_id=112

    And you will need to attend one of these courses (advanced or specialty):

    http://education.Oracle.com/pls/web_prod-PLQ-dad/db_pages.GetPage?page_id=244#5

    Referring now to go back to the link above.

    OU is always a safe choice, an OEAC should be safe, as long as they deliver a course under the ORGANIZATIONAL unit.

    So, excluding Oracle Academy program of development of labour leaves leaves (WDP).

    Sometimes it seems to me also possilble an OEAC can offer a course under (WDP).

    ... If you do the course in framework of the WDP, then the rules can be as follows:
    -You are only allowed to make a maximum number of hours / week.
    -You will need to make 11g DBA admin 2 or whatever they call it (I never go a lot on these names... a name can be manipulated, misused, abused, confused, misinterpreted and misunderstood in a misleading way).
    -The quality of the teachng o n WDP can sometimes be much less than others.
    -The course of the WDP will be generally much cheaper.
    -Your contract with the Institute of the WDP rather than Oracle... is if something is wrong with your problem with the Institute of the WDP no Oracle. (This may also apply to o).
    -I think with WDP you used to have to complete the DBA track all end to end, I think only a course (or 11(f) DBA admin I or 11g DBA admin II) is required.
    -I recommend you to get in writing, not orally, of the Institute of the WDP class you have booked and paid for will satisfy the validitating cover the hands on training for Oracle 11 g OCP DBA Certification requirements.

    Oracle WDP institutes must be identifiable here: https://workforce.oracle.com/pls/wdp/new_home.main

    (Or maybe here for the India and OEAC: http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=317)

    If in doubt, in my humble OPINION check here: https://workforce.oracle.com/pls/wdp/rd_psp_contact

    He has had problems in the past with unauthorized suppliers:

    http://blogs.Oracle.com/certification/entry/are_you_getting_your_training

    Please note my answer is not authority, and you need to check what you are doing to yourself for you sure get what you expect of him.

  • Setup SQL Fundamentals exam environment

    Hello

    I am new to oracle and SQL databases. I recently started studying for SQL databases I exam (exam 1Z0-051) and need help to create a database and connect to it with SQL developer. I use oracle 11g and the new version of the developer. I have created a database with the DBCA Wizard but can't seem to understand how to connect. I'm not also sure if tables demo (schemas OE and HR) Setup because I don't see the option when creating the database. Any help will be greatly appreciated! Thank you!

    2cea1430-bb7e-4412-b6f4-836fbf37acd1 wrote:

    Hello

    I am new to oracle and SQL databases. I recently started studying for SQL databases I exam (exam 1Z0-051) and need help to create a database and connect to it with SQL developer. I use oracle 11g and the new version of the developer. I have created a database with the DBCA Wizard but can't seem to understand how to connect. I'm not also sure if tables demo (schemas OE and HR) Setup because I don't see the option when creating the database. Any help will be greatly appreciated! Thank you!

    Do as below, then COPY & PASTE all the results back here

    [oracle@localhost ~] $ sqlplus / as sysdba

    SQL * more: Production of the version 11.2.0.2.0 on Mon Nov 17 15:06:58 2014

    Copyright (c) 1982, 2010, Oracle.  All rights reserved.

    Connected to:

    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    SQL > change identified by HR HR user account unlock;

    Modified user.

    SQL >

  • VCAP5-DCA exam questions

    You are able to read each question carefully to review before you start your first task? I don't know whether to click through 26 screens to see each question or figure it out in the begin block? Thank you

    Ed

    Yes, you can click around the review, as you can do on most VMware exams.

    There is a school of thought that clicking through all the questions and take notes you if an item is a 'create' or 'admin', their organization and then clicking back to the beginning will save time to review.

    There are a few problems with this:

    -This excersise will take you 10-20 min.  Since you have an average of 8 minutes per question, you give ~ two questions when you try this method.

    -try to determine how long will take an item or if the item is a 'creation' or 'admin' question before trying the question in fact is not always possible.  Many questions have troubleshooting components that aren't obvious until you try them.  Some read as a matter of "admin" but actually need to create components on the fly.  Some of the lists "create xxx" but that's actually a later configuration element and the question really is a "question of the admin".

    -l' review is designed to take one at a time, in order.  Items that can cause disruptions tend to go towards the end of the examination, the elements that improve the performance of review go near the front.  The items that can interfere with other elements are carefully.  A passage which does no favor.

    Note that these points are all exams live-lab, not only VCAP5-DCA, and some points are more important in some reviews.

  • OCP current Database 11 g exams Question (specifically 1Z0-053)

    Hello

    Are the current reviews of 11g certification strictly based on 11 GR 1 material or 11 GR 2?

    While the studies and have questions, I don't know if I should look into 11 2 GR or GR 11, 2 official documentation to find answers.

    Maybe there are some differences between these two versions that can guide me badly on the possible test questions.

    Thank you

    Bruno

    The reviews were created against 11 GR 1 material, but have been validated against 11 GR 2.  OU is not * need * questions in exams that have a different response between versions.  11 GR 2 validation would ensure that none exists.  I recommend you to study the documentation of R2, because it is always better to make use of the most recent incarnation of any given major version.

  • Some VCAP-DCA exam questions

    I take this test on Friday and have a few more questions I couldn't find answers for it:

    Several takers review mentioned that there is only the vma and ESX servers. What about PowerCLI? Is there any explicit questions or tasks MUST be completed with PowerCLI? If it is not installed, it is no use learning, isn't it? (except the actual skills very useful)
    Are there tasks MUST be accomplished using VMA/CLI/vSphere client/PowerCLI or this is my choice, what tool I take to accomplish the task?
    One more: I've read that vscsiStats is not installed on the ESX Server. Do we need to install it during the exam or if all the tools are pre-installed?
    I guess that these questions are not subject of the disclosure to sign...
    Thanks to adnavce for your help!

    5- DCA VCAP, you're right that AutoDeploy is included under the headings of the blueprint, of Update Manager PowerCLI is also mentioned.

    But for VCAP,4- DCA, I would describe the required level of knowledge as pretty basic PowerCLI.

  • Exam question-value of the point and unanswered questions about the VCP4 exam?

    Hello

    I have a few questions about the scoring to secure Channel 4 review system:

    1. All the questions on the exam are weighted the same?

    2. Is there a penalty for unanswered questions?  In other words, is it better to not answer a question, if you are sure that you do not know the answer, or take a guess if it comes down to it?

    Thank you very much

    Bryan

    Not responding not to an element, it is the same thing that answer wrongly as far as scoring is concerned, so it makes sense to guess rather than leave the question unanswered.

    With respect to the weighting, all elements have the same weight in the VCP exam, but some items do not count against the overall score.  These "dosed" items continually change and are chosen at random.  We insert elements assayed to determine the validity of the element until it became a party has received from the real exam.  If however, you want to treat each item with an equal amount of importance.

    Hope this helps,

    Jon C. Hall

    Technical developer certification

    [email protected]

    2077 Loma Linda way n., Clearwater, FL 33763

    727-446-8430 Office

    727-460-8448 Mobile

    Fax 702-554-3727

  • Can I expect to consult vSphere 1 update of the VCP - 410 exam questions

    I have my VCP-410 exam tomorrow and am wondering about the question to know if I am likely to see changes in the review of the recent release of vSphere update 1.

    An example may be the fact that the PVSCSI is now supported by the boot floppies (windows 2003 / 2008) where as before it was not.

    I'll assume that 1 week after the release of these changes are likely to appear.  For future reference can someone VMware tell us how long after an update can we expect the review to take account of any change in software?

    Hi all

    We always try to maintain compatibility with the current versions of the product.  Which means that you can study the current documentation.  As Scott mentioned, we probably will not add new items immediately, but us correct inconsistencies with existing items.

    Kind regards

    Jon C. Hall

    Technical developer certification

    [email protected]

    2077 Loma Linda way n., Clearwater, FL 33763

    727-446-8430 Office

    727-460-8448 Mobile

    Fax 702-554-3727

  • Preparation of exam question

    Hi all

    I recently attended the course deploy analyze and secure. I have also been hammering the simulated examination and reading the forums on what will be in a review. A fellow officer he was chatting with another person who has recently passed the review says that the VMware instructor who creates the course has people who go online and read all questions online and withdraw the review! not to mention that I have also told me that the simulated exam is useless for the study. I really want to pass this course and I get 85% almost every time I take the fictitious exam now. Although I'm now unsure as the authentisity of the content on the simulated exam.

    Can someone here who was part of the exam and studied with the fictitious review please tell me if this is correct and that your recommendations of studies entering the review.

    Simulation tests are just to give you an idea of the kinds of questions asked to collect. The difficulty level can be high or less, according to his abilities and knowledge. The best way is for interim relief I & materails C so that pdf is available online and you can break the exams easily... hope this clarifies...

    Concerning

    Anil

    Save the planet, go for green

    If you have found my reply to be useful, feel free to mark it as useful or Correct.

    http://www.LinkedIn.com/pub/5/987/995

    http://Sky-v.blogspot.com/

  • SQL output - format question

    Hello. I have the following SQL code and I would like to know if there is a way to have the dates repetition appear only once? This would make the output look better. So, in the following query, I was wondering if there is a way to get the 20/07/2011 and 21/07/2011 to display only once?

      1  select to_char(trunc(create_dt),'mm/dd/yyyy') byDay, create_by Agent,
      2  rtrim(nvl(count(*),0)) total
      3  from ttms_audit
      4  where table_nm='RCPT_MPI'
      5  and column_nm='RESPONSIBLE_IND'
      6  and old_val='RS' and new_val <> 'RS'
      7  group by rollup(to_char(trunc(create_dt),'mm/dd/yyyy'), create_by)
      8* order by to_char(trunc(create_dt),'mm/dd/yyyy'), create_by
    SQL> /
    
    BYDAY      AGENT                          TOTAL
    ---------- ------------------------------ ----------------------------------
    07/20/2011 ARHENRY                        10
    07/20/2011 MARTACG                        1
    07/20/2011 MVHOPKIN                       3
    07/20/2011                                14
    07/21/2011 MARTACG                        1
    07/21/2011                                1
                                              15
    
    7 rows selected.

    In SQL * more question

    BREAK ON byDay
    

    URS

  • access SQL vs tuning question Advisor

    I am trying to understand a question which is:

    Which of the following identifies and creates an index to reduce the time of the DB for a given SQL statement?

    (a) SQL Tuning Advisor
    (b) SQL Access Advisor

    I think the right answer is a) tuning advisor, because it is for a given SQL statement and it can also be configured to automatically create an index when it runs over the extensible standard maintenance task. However, the marked answer is b) Access Advisor. That which is correct and why?

    Thank you!

    Waldrfm,

    I guess this question of OCP is also asking if STA or SAA make recommendations in terms of DB Time (%) or the cost of the workload (%).

    When you look at the details of STA recommendation, it is show recommendations by times of DB (which includes the DB service time + queue DB time) *, in particular for each SQL statement.

    However, when you look at the details of recommendation of SAA, is show the recommendations by improving Total cost (which is the cost of CBO, SUM (IO + CPU)). * instead of DB self time

    SQL statement.

    For example,.

    When you tune in 10 identified SQL statements using the STA, it tunes indivdual SQL statement acting time of each SQL DB.

    SAA tunes instructions SQL 10 identified as a workload making recommendations based on improving Total cost of the entire workload.

Maybe you are looking for