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
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL Query - append results

SQL Query - append results

Scheduled Pinned Locked Moved Database
databasequestionsaleshelptutorial
3 Posts 2 Posters 0 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.
  • A Offline
    A Offline
    AndreFratelli
    wrote on last edited by
    #1

    Hi everyone, I'm having trouble with this query in SQL (homework!). I have two tables: customer and staff. == Customer (the relevant fields) == customer_id first_name last_name == Staff == staff_id first_name last_name The question is: "select the first and last names of all customers and staff". Can anybody help on how to do that? I don't know how to "append" the results of the two queries, and googling I can only find about INSERT ... SELECT, which is not what I'm looking for =\ Best regards to all.

    Fratelli

    C 1 Reply Last reply
    0
    • A AndreFratelli

      Hi everyone, I'm having trouble with this query in SQL (homework!). I have two tables: customer and staff. == Customer (the relevant fields) == customer_id first_name last_name == Staff == staff_id first_name last_name The question is: "select the first and last names of all customers and staff". Can anybody help on how to do that? I don't know how to "append" the results of the two queries, and googling I can only find about INSERT ... SELECT, which is not what I'm looking for =\ Best regards to all.

      Fratelli

      C Offline
      C Offline
      Chris Meech
      wrote on last edited by
      #2

      Perhaps the keyword "UNION" may help you. :)

      Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

      A 1 Reply Last reply
      0
      • C Chris Meech

        Perhaps the keyword "UNION" may help you. :)

        Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

        A Offline
        A Offline
        AndreFratelli
        wrote on last edited by
        #3

        It does indeed ! :D Thank you ;)

        Fratelli

        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