本文介绍了在sql中加入了两个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 如何加入两张桌子 i有文件资料表 docid docname uploadfile docid depid 和approvetype桌子 approveid approvetype i使用此查询 SELECT DocumentInfo.DocID, dbo.DocumentInfo.DocName, dbo.DocumentInfo.Uploadfile, dbo.DocType.DocType, dbo.Department.DepType, dbo.ApproveType.ApproveType AS ApproveID FROM dbo.DocumentInfo LEFT JOIN dbo.DocType ON dbo.DocumentInfo.DocTypeID = dbo.DocType.DocTypeID LEFT JOIN dbo.Depart ment ON dbo.DocumentInfo.DepID = dbo.Department.DepID 它显示我的错误 多部分标识符 dbo.ApproveType.ApproveType无法绑定。 解决方案 how to joined two tables i have a document info tabledociddocnameuploadfiledociddepidand approvetype tableapproveidapprovetypei use this querySELECT DocumentInfo.DocID, dbo.DocumentInfo.DocName, dbo.DocumentInfo.Uploadfile, dbo.DocType.DocType, dbo.Department.DepType , dbo.ApproveType.ApproveType AS ApproveIDFROM dbo.DocumentInfoLEFT JOIN dbo.DocType ON dbo.DocumentInfo.DocTypeID=dbo.DocType.DocTypeIDLEFT JOIN dbo.Department ON dbo.DocumentInfo.DepID=dbo.Department.DepIDand it shows me errorThe multi-part identifier "dbo.ApproveType.ApproveType" could not be bound. 解决方案 这篇关于在sql中加入了两个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-21 00:21