摘要:
? 可空(null)类型修饰符 //int x = null; // 错误,变量x不是引用类型 int? xx = null; ? : 三元(运算符)表达式 x ? y : z 表示如果表达式x为true,则返回y;如果x为false,则返回z int y = 1 > 0 ? 10 : 0; // 阅读全文
摘要:
if object_id(N'dbo.t2') is not null drop table t2go -- 需要加上这个 go 否则无效,此外 go 需要独占一行,否则报错 '分析 go 时遇到错误语法。'create table t2(id2 int,age2 int)insert into t 阅读全文
摘要:
完整Sql语句(可直接运行) -- SqlServer 使用递归公用表表达式处理数据孤岛问题 --创建测试表 -- 判断临时表 #t 是否存在 if object_id(N'tempdb..#t',N'U') is not null begin drop table #t end go create 阅读全文