
--测试环境MSSQL2008
--查询
;
With T
As
(
Select 1 As a,2 As b
Union all
Select a+2,b+2 From t Where a<10000
)
Select From T
Option(MAXRECURSION 32767)
--一次插入6万以内的(如果表不存在)
;
With T
As
(
Select 1 As a,2 As b
Union all
Select a+2,b+2 From t Where a<10000
)
Select a as 奇数,b as 偶数 into 表 From T
Option(MAXRECURSION 32767)
--一次插入6万以内的(如果表已存在)
;
With T
As
(
Select 1 As a,2 As b
Union all
Select a+2,b+2 From t Where a<10000
)
Insert Into 表
Select From T
Option(MAXRECURSION 32767)
--一次插入4096以内的,还可以用这个
Insert into 表
Select number2+1 As 奇数,(number+1)2 As 偶数 From masterdbospt_values
Where type='P'
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script language="javascript" src="jqueryjs"></script>
<script language="javascript">
$(function(){
$('#img')hover(function(){
$(this)attr('src','1440486485234596606jpg');
},function(){
$(this)attr('src','11png');
});
})
</script>
<style type="text/css">
div {border:1px solid #f00;width:100px;height:100px;}
div:nth-child(odd){background:#f00;text-align:center;}
div:nth-child(even){background:#00f;text-align:center;}
</style>
</head>
<body>
<div class="div1">我是奇数1</div>
<div class="div2">我是偶数2</div>
<div class="div3">我是奇数3</div>
<div class="div4">我是偶数4</div>
</body>
</html>
是这样的吗??主要是:nth-child()选取器的判断
以上就是关于SQL(SQL server 2008)实现插入奇数和偶数全部的内容,包括:SQL(SQL server 2008)实现插入奇数和偶数、用div来实现html奇偶行样式不一样如何实现、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)