Friday 15 May 2015

sql - Search from a table using values of a column of another table -


Suppose I have two tables.

  Table one: | Col1 | - - - - - - | Do it | Big | | Gone Table two. Col1 | Col2 | Col3 | Col4 | - - - - - - - - - - - - - - - - - | Do it Blast | Blast | Big | | Big | Do it Blast | Gone | Blast | Blast | Blast | Blast |   

How do I search from table two ? The rows displayed in such rows should have result for the given position for example col1 of table one

< Pre> | Col1 | Col2 | Col3 | Col4 | - - - - - - - - - - - - - - - - - | Big | Do it Blast | Gone

dirty problem ...

  choose two . * Two (from selection number (*) to a =) (case when in call 1 (select from one) then 1 or 0 end + case when in call 2 (select from a) then 1 pre-term + call + call case In 3 (select one from) then 1 ELS 0 and + case when in call 4 (select from one) then 1 ELSE 0 END)   

does not mention the word 'efficiency' In combination with this query should be done.

No comments:

Post a Comment