SQL数据库查询问题..急急急...在线等!!!!!!!!
select a.ID,a.fileContext,b.createDate,b.type,b.Production_Name,b.Production_Collocate,b.Production_purpose,b.Production_Type,b.Choose_piece,b.Production_id,c.ID,c.myfile,c.myfile1,c.myfile2,c.fileContext,c.fileContext1,c.fileContext2 from [File] as a,Production as b,MyFile as c where b.Production_id=a.ID and b.Production_id=c.ID and b.Production_id=1
Production是主表.File和MyFile是外键表..我要去掉重复记录..因为我MyFile里面的fileContex,fileContex1,fileContex2是image类型的字断.所以不能用distinct关键字..自己拼了半天拼不出来..谁写出来了马上结贴.谢谢...