轻设计 / 轻生活 / 轻日记 / 轻梦想 === zhoumojianshe ===
© 优特良品&优特建站出品 | Powered by YOUTIY
苏ICP备13018047号-1
SqlServer 常用语句
TAGS: 后端设计

-- 删除约束 sql
alter table "000".tbContract drop constraint DF__tbContrac__Remar__069A5CD2


-- Sql Server查看表结构语句
exec sp_help '"000".tbContract'


-- Order By中使用case when的方法
Order by S.DataType,case when S.PurchMoney < 0.005 then 0 else 1 end, S.NodeCode,S.AccDate, S.BillNumber


-- Sql Server 禁用或启用表约束
alter table "000".tbUnPayDetails  NOCHECK constraint all;//禁用表约束
alter table "000".tbUnCheckPays  CHECK constraint all;//启用表约束


-- sql获取第一条(获取分组第一条数据)
select * from(select row_number() over(partition by num order by num) gid,* from tb) tmp where gid=1

周末
2021-12-03 10:55:09
标签云
网页设计 精致慢生活 感悟思语 我的旧年华
加偶微信