在sql中生成随机名称 [英] Generate random names in sql
本文介绍了在sql中生成随机名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有 5 个随机名称,分别用于男性和女性.我需要根据性别插入随机名称.但是我们如何从 SQL 中的 5 个名称的集合中随机插入名称.是否可以?
I have 5 random names each for male and female. I need to insert random names based on the gender. But how can we insert names in random from a set of 5 names in SQL. Is it possible?
推荐答案
select name from table order by newid()
这篇关于在sql中生成随机名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文