mysql - SQL Operand should contain 1 column(s) -


i think should quite simple can't seem figure out.

i have 2 tables. table , table b joined field same value.

i want select rows table a. table b, want select joined table column in table specific value.

this how see working

select tablea.*, (select * tableb inner join tablea on tableb.id = tablea.id tablea.complete = 1) tablea 

i have run code error

operand should contain 1 column(s)

how can values table , joining rows table b table column 1?

edit:

this expect output should be

table_a.someid    table_a.col       table_a.complete      table_b.someid      table_b.col ----------------|----------------|---------------------|-------------------|---------------- 123             |      |          1          |    123            |   value 124             |      |          1          |    124            |   value 125             |      |          1          |    125            |   value 126             |      |          0          |                   |     127             |      |          0          |                   |    

i want rows table regardless of column complete value , table b row links table , complete 1.

if need anymore explanation i'll explain more

you dont need outer query. should suffice

select tablea.*  tableb inner join tablea on tableb.id = tablea.id   tablea.complete = 1 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -