I am selecting data from two different rows in the same table using a single table. "ID" "borrowed MX" "holder" "category" "country" "1" "2" "0" "3" "US" "2" "0" "1" "10" "US"
What I'm trying to do is it works. Choose ID, holder with mytable where id = 2 is borrowed from mytable id = ( from the holder) Of course, it works but since this is something I have done it together, I doubt it I use a case similar to nested selectors already There is no active work to be set of filtered results and logically used on a more consistent code. SELECT col1.id, col1.holder, col2.borrowMax from collection_db col1 zone collection_db col2 ON Col2.holder = col1.id WHERE col1.id = 2 // here, 2 value given by me and col2.category = 3
how will you do something like this? Am I on the right track? (I am sure I'm not the one.)
Choose my holder from the holder ID, WHERE id = (SELECT holder with mytable WHERE Id = 2) and category = 3
No comments:
Post a Comment