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

  • SEARCH
  • Home
  • 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 6627493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:01:16+00:00 2026-05-25T22:01:16+00:00

SELECT MsgID, Name FROM tbl_message INNER JOIN tbl_user on tbl_message.UserID = tbl_user.UserID WHERE OrgID

  • 0
SELECT MsgID, Name FROM tbl_message INNER JOIN tbl_user on tbl_message.UserID = tbl_user.UserID WHERE OrgID ='1' order by MsgID

I have a message table

msgid  msg   userid  Orgid
24     Hi     2        1
25     hsa    4        1

User table

userid     Name    Orgid
2          cas      1
4          asd      1

I want to get the name from user table. I am doing inner join to get it but I am getting error. what is wrong with the query. Error is OrgID is ambiguous

  • 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-05-25T22:01:16+00:00Added an answer on May 25, 2026 at 10:01 pm

    You can use the given query:

    SELECT message.msg, message.msgid, message.userid, 
    message.orgid, user.username, user.orgid
    FROM user INNER JOIN message 
    ON user.userid = message.userid 
    WHERE  message.orgid='1' 
    order by  message.msgid
    

    I hope this will help you out.

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

Sidebar

Related Questions

SELECT * FROM (SELECT ROW_NUMBER() OVER (ORDER BY hrl.Frn) as Row, hrl.unq, hrl.LcnsId, hc.Business,hc.Name,hc.Phone,
Select user_name [User Name], first_name [First Name], last_name [Last Name] From tab_user ORDER BY
I have a query that is... SELECT m.msgFrom, m.msgTo, m.msgID, m.subject, m.dateTime, a.username FROM
ChkNewRspLive.php <?php $query3 = SELECT msgid, id FROM rspnotificationlive WHERE username='{$username1}' ORDER BY id
SELECT sysobjects.xtype, syscolumns.name, sysindexkeys.indid, sysobjects.type FROM syscolumns LEFT JOIN sysobjects ON syscolumns.id = sysobjects.id
SELECT * FROM Table_A LEFT JOIN Table_B ON (Table_A.A_ID = Table_B.A_ID) INNER JOIN Table_C
SELECT * FROM Questions INNER JOIN QuestionKeyword INNER JOIN Keywords ON Questions.ID=QuestionKeyword.QuestionID AND QuestionKeyword.KeywordID=Keywords.ID
How to bind data from two tables. tbl_user first name userid tbl_usermessage userid timereceived
SELECT `name` , COUNT(*) AS `count` FROM `t1`, `t2` WHERE `t2`.`id` = `t1`.`id` GROUP
SELECT pe.prodtree_element_id prodID, pe.prodtree_element_name_s, li.line_name, av2.value FROM prodtree_element pe LEFT JOIN prodtree_link pl ON

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.