对支持表和类型表进行 INSERT 查询
我正在使用数据库项目(不是 Microsoft SQL Server Data Tools 附带的新数据库项目)来管理我的团队数据库更改和源代码控制优势。
现在有一些表提供简单的功能,并且是在规范化过程中创建的。例如:AddressType
表可能包含以下值:Office、Home 和 Mail。现在该表将始终具有这三个值。
如果表中还没有三个默认值,我可以使用数据库项目插入它们吗?如果是这样,我应该将数据的 IF/INSERT 脚本放在哪里?
谢谢。
I'm using a database project (not the new database project that comes with Microsoft SQL Server Data Tools) to manage my team database changes and source control benefits.
Now there are some tables that provide simple functionality and are created in the process of normalization. For example: AddressType
table that may hold these values: Office, Home, and Mail. Now this table will always have these three values.
Can I somehow, using the database project, have the three default values inserted if the table doesn't already have them? If so, where do I put the IF/INSERT script for data?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
部署后脚本中类似这样的内容:
Something like this in your post-deployment script: