随笔分类 -  SqlServer

摘要:1、给表添加字段 alter table 表名 add 字段名 int not null default 0; 2、删除表中某个字段 alter table 表名 drop column 字段名; 3、若表原字段有约束 alter table 表名 drop constraint 主/外键ID; 阅读全文
posted @ 2021-12-23 10:22 🍋.レモン 阅读(535) 评论(0) 推荐(0)
摘要:1、建立函数 Create Function [dbo].[GetAge](@BirthDay datetime)Returns varchar(20)AsBegin DECLARE @year int=0;DECLARE @month int=0;DECLARE @day int=0;DECLAR 阅读全文
posted @ 2021-08-18 15:59 🍋.レモン 阅读(3655) 评论(0) 推荐(0)