如何在SQL语法中使用DISTINCTROW [英] How to use DISTINCTROW in SQL syntax
本文介绍了如何在SQL语法中使用DISTINCTROW的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我想在sql中使用DISTINCTROW删除但是Ghesting附近有语法错误
查询:
Hi All
I wanna use the DISTINCTROW to delete in sql But have syntax error near Ghesting
Query :
DELETE DISTINCTROW FROM Ghesting ((kala INNER JOIN buyer ON kala.buyer_codem = buyer.code_m_buyer)INNER JOIN Ghesting ON buyer.code_m_buyer = Ghesting.fk_code_m_buyer) WHERE ([buyer.code_m_buyer] =@code_m_buyer) AND ([Ghesting.ser_kala]=@ser_kala) AND ([Ghesting.status_pay]= @status_pay)
如何解决?
我尝试过:
我删除了DISTINCTROW C. SQL语法中的ommand但是我有同样的错误。
How do I solve it ?
What I have tried:
I delete the DISTINCTROW Command in SQL Syntax but i have same error.
推荐答案
尝试:
Try:
DELETE DISTINCTROW FROM Ghesting kala
INNER JOIN buyer ON kala.buyer_codem = buyer.code_m_buyer
INNER JOIN Ghesting xxx ON buyer.code_m_buyer = xxx.fk_code_m_buyer
WHERE buyer.code_m_buyer = @code_m_buyer AND
xxx.ser_kala = kala.@ser_kala AND
xxx.status_pay = kala.@status_pay
但是我先备份你的数据库,因为我不知道你的表是怎样的有组织的或你要删除的数据以及你想要保留的内容!
But backup your DB FIRST as I have no idea of how your tables are organised or what data you want to delete and what you want to keep!
选择DISTINCTROW e。*
FROM amp AS e JOIN m ON ON(e。 sn = m.sn)AND(e.pn = m.pn)
select DISTINCTROW e.*
FROM amp AS e inner JOIN m ON (e.sn= m.sn) AND (e.pn= m.pn)
这篇关于如何在SQL语法中使用DISTINCTROW的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文