- 博客(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
6789
原创 HTML <a></a>在新窗口打开链接
<a target = "_blank" href="#">AAA</a> #:表示要跳转的连接 点击 AAA 超链接,将在新窗口打开#连接
2018-11-15 18:28:26
16640
原创 SQL Server transaction+在sql执行中进行条件判断
begin transaction declare @parameter type select @parameter = count(*) from table_name where A = ' ' if @parameter1 <> 0 begin 执行sql end else begin 执行sql end commit transaction 例:...
2018-11-14 21:29:55
534
原创 SQL Server iff函数的使用
select iff(条件,1,2) from table_name 条件:带有字段值的判断表达式,结果为 true || false 1:当条件判断为true时选择的结果值 2:当条件判断为false时选择的结果值 例:select iff(age < 18,‘未成年’,‘已成年’) as ‘是否成年’ from person 从person表查询age列,判断某个person的...
2018-11-13 20:25:33
9048
原创 js重定向页面
<script type="text/javascript"> window.location.href='url'; window.location.replace('url'); </script>
2018-11-13 20:05:28
2720
原创 SQL Server case函数的使用
1: select case A when ' ' then ( case B when ' ' then C else B end ) else A end from table_name 2: select case when A <> ' ' or A is not null then A when B <> ' ' or B is not null th...
2018-11-12 20:38:02
2564
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅