SQL Server: Should all numbers be specified using latin digits?

Does the SQL server check the number that must be indicated by digits from the Latin alphabet, for example:

0123456789 

Can SQL Server numbers be specified in other alphabets?

Rosetta Stone:

 Latin: 01234567890 Arabic: ٠١٢٣٤٥٦٧٨٩ Bengali: ০১২৩৪৫৬৭৮৯ 

I know that the client (ADO) converts 8-bit strings to 16-bit unicode strings using the current culture. But the client also converts numbers to strings using their current culture, for example:

 SELECT * FROM Inventory WHERE Quantity > ২৩৪,৭৮ 

What causes SQL Server to fit.

I know that the server / database has a specific code page and locale, but this is for strings.

Will SQL Server interpret the numbers using the active (or specified for each user) locale, or should all numeric values ​​be specified with numbers in Latin letters?

+4
source share
1 answer

From what I can tell, T-SQL requires latin digits and decimal points indicated as . .

Neither ISNUMERIC () nor CAST () can successfully test these numbers, so a numerical constant using these characters will not work either.

Allowing the client to transmit non-Latin numbers sounds dangerous randomly (I'm not sure if the path of your data is moving, but there seems to be potential for SQL injection if the user's localized input is not tested as numerical.

+3
source

Source: https://habr.com/ru/post/1304902/


All Articles