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.
我想快速更新一个表以摆脱任何被拉到测试服务器的真实数据。
UPDATE users SET email = CONCAT ("fake", users.id, "@mycompany.org")
有这样的可能还是我需要写一个脚本?
是的,您使用的查询将起作用。也就是说,对于像这样的一行:
id = 21 name = 'sth' email = NULL
它将更新并将电子邮件设置为:
'fake21@mycompany.org'
同样对于整个表中的所有行。