查询mysql服务器 [英] Query for mysql server
本文介绍了查询mysql服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过使用mysql中的单个查询清除10个表或maore表中的所有数据?
谢谢你在广告中...
How to clear all the data from 10 or maore tables by using single query in mysql?
Thank u in adv...
推荐答案
您可以尝试select * from table where 1 = 2
一起尝试.
Try this together.
EXEC sp_MSForEachTable ''ALTER TABLE ? NOCHECK CONSTRAINT ALL''
EXEC sp_MSForEachTable ''DELETE FROM ?''
EXEC sp_MSForEachTable ''ALTER TABLE ? CHECK CONSTRAINT ALL''
更多信息 ^ ].
More info here[^].
在这里....多种方法
MySQL空数据库/删除或删除所有表 [ MySQL:轻松删除所有数据并重新种子化所有表 [ ^ ]
从MYSQL中的所有表中删除数据 [如何在MySQL中截断全部或部分表数据库 [ ^ ]
Here you go....more than couple of ways
MySQL Empty Database / Delete or Drop All Tables[^]
MySQL: Easily delete all data and reseed all tables[^]
Delete data from all tables in MYSQL[^]
How to Truncate All or Some of the Tables in a MySQL Database[^]
这篇关于查询mysql服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文