在我的應用程序的服務器端,我使用MS SQL Server 2014 Express。在客戶端我有C#WPF應用程序,我有以下枚舉類型:如何在MS SQL Server 2014中創建新的數據類型?
/// <summary>
/// User authorization level.
/// </summary>
public enum UserAuthorizationLevel
{
/// <summary>
/// Only visual inspection is allowed (the first lower level).
/// </summary>
Inspection,
/// <summary>
/// Some settings in apparatus are allowed (the second level).
/// </summary>
SettingDeviceParametersApplied,
/// <summary>
/// Some more setting in apparatus are allowed than in the second level (the third level).
/// </summary>
Maintenance,
/// <summary>
/// Apparatus manufacturer level - full access is allowed (the highest level).
/// </summary>
Manufacturer
}
我可以創建這種類型的服務器端(在MS SQL Server數據庫),並使用這種類型的類型在數據庫表中的字段?
** [CLR User-Defined Types](https://msdn.microsoft.com/en-us/library/ms131120.aspx)**。 SQL Server也有自己的CLR數據類型,如[hierarchyid](https://msdn.microsoft.com/en-us/library/bb677290.aspx)/ [geography](https://msdn.microsoft.com/en-us /library/cc280766.aspx)。 – lad2025