删除表中的一些记录而不使用top和where子句。 [英] delete some records in a table without using top and where clause.

查看:50
本文介绍了删除表中的一些记录而不使用top和where子句。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于ex:我在表中有5000条记录我要删除表中的任何1000条记录

而不使用Top和where子句

我如何能帮助我。

for ex: I have 5000 records in a table I want to delete any 1000 records in a table
without using Top and where Clause
how I can help me.

推荐答案

问题是,除非你有一个WHERE子句或类似的SQL将删除所有记录 - 所以要限制你的输入只是任何1000条记录你会需要某种过滤。



我很确定你正在尝试做一些在其他地方更好处理的事情,因为删除随机记录不是函数SQL通常用于。

我会坐下来思考你正在尝试做什么以及为什么你认为SQL在继续之前是一个很好的工具。
The problem is that unless you have a WHERE clause or similar SQL will delete all records - so to restrict your input to just "any 1000 records" you would need some kind of filtering.

I'm pretty sure that you are trying to do something that would be better handled elsewhere, because deleting random records is not a function SQL is normally used for.
Id'd sit back and think about exactly what you are trying to do and why you think SQL is a good vehicle for this before continuing.


在没有给出条件的情况下你无法删除所需的记录,应该有一些删除记录的条件,没有这意味着它会删除所有记录。



As OriginalGriff建议重新检查哟你的要求,并以适当的要求回来。
Without giving condition you can't delete the required records, there should be some condition for deleting records, without that means it's delete all the records.

As "OriginalGriff" Suggested recheck your requirement and come back with the proper requirement.


这篇关于删除表中的一些记录而不使用top和where子句。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆