Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL evaluation

SQL evaluation

Scheduled Pinned Locked Moved Database
questiondatabasesalesregex
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PIEBALDconsult
    wrote on last edited by
    #1

    I just took an online evaluation of my SQL skills (SQL-FU?). How would you answer this question: " Given the following SQL statement: SELECT customers.customerid, currentbalance FROM customers LEFT OUTER JOIN customer_balance ON customers.customerid = customer_balance.currentbalance Which of the following statements correctly describe the result set? A. Only customerid values with a matching value in the customer_balance table will be displayed in the result set. B. All currentbalance columns from the customer_balance table will be displayed in the result set. Customerid values will be displayed for each customerid with a matching value in the customers table. Null will be displayed as the value for currentbalance for all customerids with no match in the customer_balance table. C. All currentbalance columns from the customer_balance table will be displayed in the result set. Customerid values will be displayed for each customerid with a matching value in the customers table. A customerid value of null will be displayed for each customerid without a matching value in the customers table. D. All customerid columns from the customer_balance table will be displayed in the result set. Current balance values will be displayed for each customerid with a matching customerid value in the customer_balance table. Zero will be displayed as the value for current balance for all customerids with no match in the customer_balance table. E. All customerid columns from the customers table will be displayed in the result set. Current balance values will be displayed for each customerid with a matching customerid value in the customer_balance table. Null will be displayed as the value for current balance for all customerids with no match in the customer_balance table. " I decided that customers.customerid = customer_balance.currentbalance was a typo and chose E. Ah, well, at least I got 83rd percentile. :-D

    _ 1 Reply Last reply
    0
    • P PIEBALDconsult

      I just took an online evaluation of my SQL skills (SQL-FU?). How would you answer this question: " Given the following SQL statement: SELECT customers.customerid, currentbalance FROM customers LEFT OUTER JOIN customer_balance ON customers.customerid = customer_balance.currentbalance Which of the following statements correctly describe the result set? A. Only customerid values with a matching value in the customer_balance table will be displayed in the result set. B. All currentbalance columns from the customer_balance table will be displayed in the result set. Customerid values will be displayed for each customerid with a matching value in the customers table. Null will be displayed as the value for currentbalance for all customerids with no match in the customer_balance table. C. All currentbalance columns from the customer_balance table will be displayed in the result set. Customerid values will be displayed for each customerid with a matching value in the customers table. A customerid value of null will be displayed for each customerid without a matching value in the customers table. D. All customerid columns from the customer_balance table will be displayed in the result set. Current balance values will be displayed for each customerid with a matching customerid value in the customer_balance table. Zero will be displayed as the value for current balance for all customerids with no match in the customer_balance table. E. All customerid columns from the customers table will be displayed in the result set. Current balance values will be displayed for each customerid with a matching customerid value in the customer_balance table. Null will be displayed as the value for current balance for all customerids with no match in the customer_balance table. " I decided that customers.customerid = customer_balance.currentbalance was a typo and chose E. Ah, well, at least I got 83rd percentile. :-D

      _ Offline
      _ Offline
      _Damian S_
      wrote on last edited by
      #2

      Assuming that it was a typo (which it must be since there was no option for "this is crap and if I can't pick this error up I shouldn't be using SQL"), then answer E is correct.

      I don't have ADHD, I have ADOS... Attention Deficit oooh SHINY!! Booger Mobile (n) - A bright green 1964 Ford Falcon - our entry into the Camp Quality esCarpade!! Do something wonderful - make a donation to Camp Quality today!!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups