SQL query problem

后端 未结 4 1923
孤独总比滥情好
孤独总比滥情好 2020-12-18 14:21

Let´s say I have two tables, \"Garden\" and \"Flowers\". There is a 1:n-relationship between these tables, because in a garden can be many flowers. Is it possible to write a

4条回答
  •  独厮守ぢ
    2020-12-18 14:46

    If you only want the results for one garden at a time this would give you the data:

    select gardenName from tblGarden where gardenid = 1 
    Union ALL 
    select tblFLowers.flowerName from tblFlowers where gardenid = 1
    

提交回复
热议问题