mysql sorting and ranking statement

前端 未结 3 859
臣服心动
臣服心动 2021-01-16 16:49

I need some help in mysql statement Ive table1 with 7 column and table 2 with 8 column the extra column named ranking , my statement should be like select all from table 1

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-16 17:41

    You need to do something like this:

    SELECT * FROM `table1`
    INNER JOIN `table2` USING ([a common filed name here])
    ORDER BY table2.[the filed name here]
    

    Good Luck!

提交回复
热议问题