Role.sql 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. Navicat SQL Server Data Transfer
  3. Source Server : 9000
  4. Source Server Version : 105000
  5. Source Host : .\sqlexpress:1433
  6. Source Database : LHBMS
  7. Source Schema : dbo
  8. Target Server Type : SQL Server
  9. Target Server Version : 105000
  10. File Encoding : 65001
  11. Date: 2021-05-11 15:34:05
  12. */
  13. -- ----------------------------
  14. -- Table structure for Role
  15. -- ----------------------------
  16. DROP TABLE [dbo].[Role]
  17. GO
  18. CREATE TABLE [dbo].[Role] (
  19. [ID] uniqueidentifier NOT NULL DEFAULT (newid()) ROWGUIDCOL ,
  20. [Name] nvarchar(50) NOT NULL ,
  21. [RoleNo] int NULL ,
  22. [Remark] nvarchar(100) NULL
  23. )
  24. GO
  25. IF ((SELECT COUNT(*) from fn_listextendedproperty('MS_Description',
  26. 'SCHEMA', N'dbo',
  27. 'TABLE', N'Role',
  28. 'COLUMN', N'RoleNo')) > 0)
  29. EXEC sp_updateextendedproperty @name = N'MS_Description', @value = N'角色编码'
  30. , @level0type = 'SCHEMA', @level0name = N'dbo'
  31. , @level1type = 'TABLE', @level1name = N'Role'
  32. , @level2type = 'COLUMN', @level2name = N'RoleNo'
  33. ELSE
  34. EXEC sp_addextendedproperty @name = N'MS_Description', @value = N'角色编码'
  35. , @level0type = 'SCHEMA', @level0name = N'dbo'
  36. , @level1type = 'TABLE', @level1name = N'Role'
  37. , @level2type = 'COLUMN', @level2name = N'RoleNo'
  38. GO
  39. -- ----------------------------
  40. -- Records of Role
  41. -- ----------------------------
  42. INSERT INTO [dbo].[Role] ([ID], [Name], [RoleNo], [Remark]) VALUES (N'374B45EE-4406-498D-8BB3-1B5248A362CF', N'系统管理员', N'100001', null)
  43. GO
  44. GO
  45. INSERT INTO [dbo].[Role] ([ID], [Name], [RoleNo], [Remark]) VALUES (N'98538F59-2064-4AB9-9F33-59CE3EF84B78', N'安装员', N'100002', null)
  46. GO
  47. GO
  48. INSERT INTO [dbo].[Role] ([ID], [Name], [RoleNo], [Remark]) VALUES (N'14B06CC9-B5A4-46AB-9769-7F405B618677', N'普通操作员', N'100004', null)
  49. GO
  50. GO
  51. INSERT INTO [dbo].[Role] ([ID], [Name], [RoleNo], [Remark]) VALUES (N'E176DE4C-EBF3-4DBA-9B48-B38F7522B7C1', N'值班员', N'100005', null)
  52. GO
  53. GO
  54. -- ----------------------------
  55. -- Indexes structure for table Role
  56. -- ----------------------------
  57. -- ----------------------------
  58. -- Primary Key structure for table Role
  59. -- ----------------------------
  60. ALTER TABLE [dbo].[Role] ADD PRIMARY KEY ([ID])
  61. GO