sql server
yandao
“我是谁”、“我在哪”、“我要去哪儿”
展开
-
T-SQL使用约束
约束是在表中定义的用于维护数据库完整性的一些规则 常用的约束类型如下: 约束类型 备注 主键约束:(Primary Key constraint) 要求主键列唯一,并且不允许为空 唯一约束:(Unique Constraint) 要求该列唯一,允许为空,但只能出现一个空值 检查约束:(Check Constraint) 某列取值范围限制、格式限制等。如有关年龄的限制 默认约束:(Default Constraint) 某列的默认值,如我们的男性学员比较多,性别默认为男 外键约原创 2021-01-12 15:47:15 · 802 阅读 · 0 评论 -
SQL Server Error: Saving Changes is not permitted. The changes you have made require the following t
问题 修改数据库表的时候,无法选择保存,提示:saving changes is not permitted,如下图 解决方案 Open SQL Server Management Studio From the file menu, choose Tools à Options From the left menu, choose Designers Uncheck the box entitled Prevent saving changes that require table re-creati原创 2021-01-12 11:05:40 · 525 阅读 · 0 评论 -
Sql Server登录使用用户名/密码的方式
Sql Server 安装完成后默认使用本机登录,现在需求是切换到使用用户名和密码登录,一共有三步 1.启用用户名密码的验证方式 默认是windows authentication mode 修改为SQL Server and windows authentication mode 2.重启Sql Server服务 (1)方式一 cmd->compmgmt.msc->服务->SQL Serever(MSSQLSERVER) (2)方式二 需要以管理员身份运行cmd C:\WIND原创 2021-01-11 09:18:51 · 4061 阅读 · 0 评论