Hows内连接语法是否有效?我是SQL的新手,我真的不明白INNER JOIN是如何工作的
queryString = @"SELECT * from WGCDOCCAB
WHERE serie ='1' AND tipodoc ='FSS' AND contribuinte ='999999990' AND numdoc =
INNER JOIN wgcnumeradores on wgcdoccab.numdoc = wgcnumerador.numero";
有人能告诉我什么是错的,我确定它的语法,我使用C#Visual Studio 2013和MySQl
答案 0 :(得分:0)
当您从多个表中提取相关数据时,将使用内部联接。如上所述,INNER JOIN出现在WHERE子句之前。试试这个:
queryString = @"SELECT * from WGCDOCCAB
INNER JOIN wgcnumeradores on wgcdoccab.numdoc = wgcnumerador.numero
WHERE serie ='1' AND tipodoc ='FSS' AND contribuinte ='999999990'";
以下是内部联接的说明:
https://technet.microsoft.com/en-US/library/ms190014(v=SQL.105).aspx