sql age20-30,name5字符、插入耗时、100道加法题
来源:互联网 发布:linux 系统编程delay 编辑:程序博客网 时间:2024/06/07 14:37
一、
create table tb1
(nm varchar(10),ag int)
drop table tb1
--select rand()*11
--select cast (floor (rand()*10) as int)
--姓名5字符 ag20-30
declare @nn varchar(10),@gg int
declare @i int,@j int
set @i=1
while @i<=100
begin
set @nn=char(rand()*58+65)
set @j=1
while @j<=4
begin
set @nn=@nn+char(rand()*58+65)--得到5个
set @j=@j+1
end
set @gg=rand()*11+20
insert into tb1 values(@nn,@gg)
set @i=@i+1
end
select *from tb1
二、
create table p1(nid varchar(40),num int)
declare @i int ,@nd varchar(40),@nn int,@dd datetime
set @i=1
set @dd=getdate()
while(@i<=10000)
begin
set @nd=newid()
set @nn=rand()*10000
insert into p1 values(@nd,@nn)
set @i=@i+1
end
select datediff(ms,@dd,getdate())
三、
declare @pl1 int,@pl2 int,@pl3 int,@i int ,@n int,@d char
set @i=1
set @n=0
set @d= '='
while @i<=100
begin
set @pl1=rand()*100
set @pl2=rand()*100
set @pl3=@pl1+@pl2
if @pl3<100 and @pl3>=10
begin
set @n=@n+1
insert into plus values(@n,@pl1,@pl2,@pl3)
set @i=@i+1
end
end
--select * from plus
0 0
- sql age20-30,name5字符、插入耗时、100道加法题
- sql 耗时
- Oracle SQL 插入特殊字符
- 计算执行sql耗时
- sql server 查询耗时
- informix SQL 执行耗时
- SQL查询耗时
- Oracle 查询耗时 SQL
- Oracle 查询耗时 SQL
- sqlite3数据插入耗时问题
- printf打印字符耗时多少
- mysql记录耗时的sql
- MySQL分析SQL耗时瓶颈
- 加法运算和乘法运算的耗时问题
- Android sqlite 插入耗时的问题
- iOS数据库 创建事物插入 一条条插入非常耗时
- Oracle Sql插入数据中特殊字符的处理
- 在SQL Server中插入®特殊字符
- Spring 使用注解方式进行事务管理
- 算法新解(一)
- 18:买书
- 信息的表示与处理
- 二叉树遍历(递归与非递归实现)
- sql age20-30,name5字符、插入耗时、100道加法题
- java设计模式--工厂模式
- Android Log管理工具
- 二叉树的后序遍历
- 史上最简单的SpringCloud教程 | 第十一篇: docker部署spring cloud项目
- java json字符串转JSONObject和JSONArray 循环取值
- Dubbo ---- 启动时检查-直连提供者
- Devstack部署多节点Openstack
- 请输入密码