一个观点我有两个表:使得从SQL数据库
1. Products with the following columns:
* ID
* SerialNumber
* Name
2. ProductsData
* ID
* ProductID
* DateOfData
* DataValue
我想用视图:
* Product name.
* product serial number
* the last date of data for this product.
* the data value in this datetime
如何做呢,通过SQL查询来进行查看?
感谢
我试着用innerjoin的东西,但它在第二个表中返回所有行。我只想要最后一个数据 – user1902346
@ user1902346下一次,将您的问题与您的问题一起发布,这样人们就会知道您在询问之前需要付出一些努力。这通常会带来更多的答案和更少的问题。 –