- 工信部备案号 滇ICP备05000110号-1
- 滇公安备案 滇53010302000111
- 增值电信业务经营许可证 B1.B2-20181647、滇B1.B2-20190004
- 云南互联网协会理事单位
- 安全联盟认证网站身份V标记
- 域名注册服务机构许可:滇D3-20230001
- 代理域名注册服务机构:新网数码
--建主键
ALTER TABLE [dbo].[t_test] ADD CONSTRAINT [PK_t_test] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
--删主键
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[t_test]') AND name = N'PK_t_test')
ALTER TABLE [dbo].[t_test] DROP CONSTRAINT [PK_t_test]
--建索引
CREATE NONCLUSTERED INDEX [t_test_index] ON [dbo].[t_test]
(
[v1] ASC,
[v2] ASC,
[v3] ASC,
[v4] ASC
)WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
--删除索引
DROP INDEX [t_test_index] ON [dbo].[t_test] WITH ( ONLINE = OFF )
--建唯一键
ALTER TABLE [dbo].[t_test] ADD CONSTRAINT [t_test_unique] UNIQUE NONCLUSTERED
(
[v1] ASC,
[v2] ASC,
[v3] ASC
)WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY]
--删除唯一键
IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[t_test]') AND name = N't_test_unique')
ALTER TABLE [dbo].[t_test] DROP CONSTRAINT [t_test_unique]
售前咨询
售后咨询
备案咨询
二维码
TOP