now i want to select all values of col2 that two different values of col1 have in common. for example the two values of col1 1 and 3 will give one value --> 2 because 1 and 3 in col1 have the value 2 in col2 in common.
How to do this ?
__________________ Please login or register to view this content. Registration is FREE
Check out the Facebook Clone build with Jcow SNS at Please login or register to view this content. Registration is FREE , it is free and it always will be
I wonder if you could explain your meaning more clearly,that would be very nice.I can sure that you can select the appropriate data from tables if you run the right select query language.
Assuming I have understood what you want, (which is very doubtful because it's pretty vague). You can't.
It will need a stored procedure.
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
SELECT t1.col2 FROM `mytable` as t1 inner join `mytable` as t2 on t1.col2 = t2.col2 where t1.col1 = val1 and t2.col2 = val2
now the result of this select needs to be joined with a second table where t1.col2 is linked with the primary key of the second table.
how do this ?
__________________ Please login or register to view this content. Registration is FREE
Check out the Facebook Clone build with Jcow SNS at Please login or register to view this content. Registration is FREE , it is free and it always will be
Please login or register to view this content. Registration is FREE Collection of free online books and free ebooks Please login or register to view this content. Registration is FREE - Free online pdf books and free pdf eBooks