- 博客(6)
- 收藏
- 关注
原创 SQL Server row_number() over()函数的使用
row_number() over(partition by 1 order by 2 desc) 1:表中的某一个列名2:表中的某一个列名该函数表示数据按列1分组,分组后各组按列2降序排序,函数返回各行数据在各组中的排序编号例:select employeeId,departmentId ,salary ,row_number() over(partition by depa...
2019-01-02 21:29:32 6240
原创 HTML <a></a>在新窗口打开链接
<a target = "_blank" href="#">AAA</a>#:表示要跳转的连接点击 AAA 超链接,将在新窗口打开#连接
2018-11-15 18:28:26 16437
原创 SQL Server transaction+在sql执行中进行条件判断
begin transactiondeclare @parameter type select @parameter = count(*) from table_name where A = ' 'if @parameter1 <> 0begin执行sqlendelsebegin执行sqlendcommit transaction例:...
2018-11-14 21:29:55 404
原创 SQL Server iff函数的使用
select iff(条件,1,2) from table_name条件:带有字段值的判断表达式,结果为 true || false1:当条件判断为true时选择的结果值2:当条件判断为false时选择的结果值例:select iff(age < 18,‘未成年’,‘已成年’) as ‘是否成年’ from person从person表查询age列,判断某个person的...
2018-11-13 20:25:33 8224
原创 js重定向页面
<script type="text/javascript"> window.location.href='url'; window.location.replace('url');</script>
2018-11-13 20:05:28 2609
原创 SQL Server case函数的使用
1: select case A when ' ' then ( case B when ' ' then C else B end ) else A end from table_name2: selectcasewhen A <> ' ' or A is not null then Awhen B <> ' ' or B is not null th...
2018-11-12 20:38:02 2420
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人