当前位置:Gxlcms > 数据库问题 > 数据库随笔

数据库随笔

时间:2021-07-01 10:21:17 帮助过:1人阅读

wfc_db go create table TestCase( Id int, CaseName varchar(20), UpdateDate datetime ) alter table testcase add [from] varchar(20) insert into Dbo.TestCase values(1, 5555, Getdate(), shanghai) insert into Dbo.TestCase values(2, 66666, Getdate(), NANJING) select * from Dbo.TestCase declare @aa varchar(20) select @aa = SHANGHAI print @AA if @AA = (select [from] from testcase) print yes else print no select [from] from testcase DELETE FROM TESTCASE WHERE ID = 2 View Code

  1、当对象名为sql中的关键字时,需要用[]包括

  2、创建表时,字段默认是可以为空的

4、in

 

数据库随笔

标签:

人气教程排行