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 8250605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:56:57+00:00 2026-06-07T23:56:57+00:00

I have a table A with the following definition in MySQL ———————————- id c_id

  • 0

I have a table A with the following definition in MySQL

----------------------------------
id    c_id     t_id
-------------------------------

where c_id references cid on another table B with the following definition

================================================
id cid cname
=================================================

So i am issuing the following query

select group_concat(cname) as list
from A join B using (cid)
where t_id="something";

But I m getting the following error

Unknown column "cid" in from clause

I tried changing it to “c_id”, but that doesnt seem to work either..

Any help is appreciated.

Thanks

  • 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-07T23:56:59+00:00Added an answer on June 7, 2026 at 11:56 pm

    USING in MySQL is just a short form for a standard ON clause, and only works when the column name is identical in both tables.

    From the manual:

    The USING(column_list) clause names a list of columns that must exist
    in both tables.

    Instead, do this:

    select group_concat(B.cname) as list 
    from A 
    inner join B on A.c_id = B.cid 
    where A.t_id = 'something';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following MySQL query: SELECT value_1, ( SELECT value_4 FROM table_1 WHERE
I have the following script to create a table in MySQL version 5.1 which
I have a table with with 7,526,511 records with the following definition: /****** Object:
I have a table FOO with the following definition: id INTEGER, type INTEGER, data
I have the following query: ;WITH XMLNAMESPACES ( 'Bob' AS b ) SELECT 'Test'
I have a table with the following declarative definition: class Type(Base): __tablename__ = 'Type'
I currently have the following table definition: <table border=1 cellspacing=0 bordercolor=#CEDFEF cellpadding=1> I am
I have the following route definition in a MapRoute Table: routes.MapRoute( ViewDocument, browse/document/{document_id}/{document_title}, new
I have the following table declared in MySQL: CREATE TABLE IF NOT EXISTS `ci_sessions`
Suppose I have the following table definition: CREATE TABLE x (i serial primary key,

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.