Shaun Wingrin
asked on
MySQL Order by Value in Table
Say, I've 2 tables.
t1 has columns RowPos and ItemCode. RowPos is an int
t2 has only column ItemCode
I wish to select * from t2 and ORDER ASCENDING by RowPos in t1
Database is MySQL
Tx.
t1 has columns RowPos and ItemCode. RowPos is an int
t2 has only column ItemCode
I wish to select * from t2 and ORDER ASCENDING by RowPos in t1
Database is MySQL
Tx.
SELECT t2.* FROM t1, t2 WHERE t1.ItemCode = t2.ItemCode ORDER BY by t1.RowPos
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
all item codes in t1 are not in t2