Order by in Inner Join

后端 未结 6 2179
离开以前
离开以前 2021-02-18 17:05

I am putting inner join in my query.I have got the result but didn\'t know that how the data is coming in output.Can anyone tell me that how the Inner join matching the data.Bel

6条回答
  •  你的背包
    2021-02-18 17:26

    In SQL, the order of the output is not defined unless you specify it in the ORDER BY clause.

    Try this:

    SELECT  *
    FROM    one
    JOIN    two
    ON      one.one_name = two.one_name
    ORDER BY
            one.id
    

提交回复
热议问题