Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8784439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:05:23+00:00 2026-06-13T21:05:23+00:00

I was shown the ease that one can make a view from multiple tables,

  • 0

I was shown the ease that one can make a view from multiple tables, GROUPing BY an id of one of the tables in xception’s awesome answer here: CREATE VIEW WHERE SELECTid = VIEWrowID

Is there any way to do that in MS? Everywhere, I’ve read says “no”, but no page gives an alternative.

I don’t need the counts or anything, just multiple columns from multiple tables GROUPed BY(?) a single column on one table.

Thanks a lot in advance!

EXAMPLE

Thank-you for responding.

For the view’s SELECT:

SELECT dbo.table1.column1 AS table1column1,
       dbo.table1.column2 AS table1column2,
       dbo.table2.column1 AS table2column1,
       dbo.table2.column2 AS table2column2
FROM table1, table2
WHERE table2.column1 = table1.column1
GROUP BY table1.column1
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:05:24+00:00Added an answer on June 13, 2026 at 9:05 pm

    As MySQL simply picks a random value from the non-grouped columns, the following should do it:

    SELECT dbo.table1.column1 AS table1column1,
           min(dbo.table1.column2) AS table1column2,
           min(dbo.table2.column1) AS table2column1,
           min(dbo.table2.column2) AS table2column2
    FROM table1, table2
    WHERE table2.column1 = table1.column1
    GROUP BY table1.column1
    

    I highly recommend you read this blog posting http://rpbouman.blogspot.de/2007/05/debunking-group-by-myths.html to understand what MySQL is doing (wrong)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The on/off switches shown on http://developer.android.com/design/building-blocks/switches.html#switches are awesome. I can't figure out how to
I downloaded a sample code from here: http://gallery.expression.microsoft.com/ShowHideWithFlip Now my problem is that i'm
As shown below the Table Recording contains three foreign keys, only one of which
Apart from what is shown in the NXP websites regarding mifare plus and mifare
What I'm trying to do is create a class that I can quickly attach
For ease of distribution I want all the mysql linked tables to be DSN-less.
I'm looking for the best practice for C++ codings style that will ensure ease
By a multi-site system I am referring to a system that has multiple panes
I've got two divs, we'll all them id=one and id=two for ease. There is
I am using this code to transition from the current view to another and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.