SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,494 questions
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.
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".