SQL Server | Other
Additional SQL Server features and topics not covered by specific categories
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
We have requirement - the column should accept the hyphen(-) or dot.
The column data type is nvarchar.
Please let me know if it is possible.
Additional SQL Server features and topics not covered by specific categories
Answer accepted by question author
Hi @Bilal H. Bhatt
Yes, it is possible.
Check this sample:
DECLARE @TBL TABLE (COL NVARCHAR(20))
INSERT INTO @TBL VALUES(N'AAA-BBB.CCC')
SELECT * FROM @TBL
Best regards,
Cosmog
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".