sql一些命令

Posted 桃源结义

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql一些命令相关的知识,希望对你有一定的参考价值。

1、创建表

create table tSId
(
   tSid int identity(1,1) primary key,
   tSName varchar(10) check(len(tSName)>2),
   tSGender char(2) default(‘男‘),
   tSAddress varchar(50) null,
   tSPhone char(11) null,
   tSAge int chect(tSAge>18 and tSAge<60),
   tSBirthay date not null,
   tSCardld varchar(18) not null,
   tClassId int foreign key references TblClass(TClassId)              
)

 2、插入

insert into Users(UserName,UserPwd) values(‘ccc‘,123456)

  

以上是关于sql一些命令的主要内容,如果未能解决你的问题,请参考以下文章

Microsoft SQL Server 代码片段收集

缺少 SQL SERVER 2014 代码片段

sql Oracle代码片段

sql 日期转换代码片段 - Dato,120,konvertere

以下代码片段是不是容易受到 Rails 5 中 SQL 注入的影响?

VSCode自定义代码片段——git命令操作一个完整流程