Is it possible to edit a partition function on MSSQL 2016?
The implicit conversion of the Unicode literal to varchar is a one-time operation done when the DDL is executed. The &quot;typo&quot; ('N' national character prefix) is not part of the partition function definition nor used by SQL Server after creation. The Unicode literal is generated by SMO when the function definition scripted.
The actual boundary values are a SQL_VARIANT type and match the partition function data type definition regardless of the specified literal. The catalog view query below shows this:
SELECT
      prv.value AS BoundaryValue
    , SQL_VARIANT_PROPERTY(value, 'BaseType') AS DataType
    , SQL_VARIANT_PROPERTY(value, 'MaxLength') AS Length
FROM sys.partition_functions AS pf
JOIN sys.partition_range_values AS prv ON prv.function_id = pf.function_id
WHERE pf.name = N'Partition_by_customer';

Results:
+---------------+----------+--------+
| BoundaryValue | DataType | Length |
+---------------+----------+--------+
| DMA           | varchar  |     10 |
| DMB           | varchar  |     10 |
| DMC           | varchar  |     10 |
| DMD           | varchar  |     10 |
| DME           | varchar  |     10 |
+---------------+----------+--------+