Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何检查表中是否存在特定行?
您可以使用SELECTorSELECT COUNT语句。如果他们返回任何东西,那么,该行存在,否则,它不存在。
SELECT
SELECT COUNT
这将导致最少的网络流量:
select 1 from table where <conditions> limit 1