做了四个题。。 A. Vasya And Password 直接特判即可,,为啥泥萌都说难写,,,, 这个子串实际上是忽悠人的,因为每次改一个字符就可以 我靠我居然被hack了???&am…
case when和decode函数用法有一些相似,只是decode是枚举函数,而case when则更加灵活,同时case when相当于一个特殊的只有两个枚 case when语句语法如下: case when 表达式 then valueA else valueB end; 具体使用如下:…
select [Id],[TrainNumber],[SupplierId], case warehouseType when 0 then [Amount] else [Amount]*-1 end as IsOut // 数据对比,[Amount],[ClassId],[WarehouseType],[Remark],[SetInDate] from WWeiqinWarehousing创建了一个列数据是 Isout即可,其实就是 当数…
关于case when then else end 的用法
今天小白来总结一下case when 的意思和用法 case when 顾名思义就是 “如果当的意思”,例如下面这个sql SELECT NAME, CASE sex WHEN ‘1’ THEN ‘男’ WHEN ‘2’ THEN ‘女’ ELSE ‘人妖’ end “性别” FROM a_test; 如果…