简体   繁体   中英

Create a SQL database in Azure Portal let you select a collation. How to retrieve this list externally?

When we create a SQL database on the Azure Portal, the portal give the possibility to select the collation you want from a list:

在此处输入图像描述

I would like to integrate this list in my own azure devops extension, inside the task.json. I know set dataSourceBindings, query and filter REST Api.

Here, my problem is to find the source of this collection list, where it is stored?

Does anybody can help me to find the way?

For SQL Server you can execute these selects to get all collations:

These are Windows related: SELECT * FROM sys.fn_helpcollations() WHERE name NOT LIKE 'SQL%'

These are SQL Server related: SELECT * FROM sys.fn_helpcollations() WHERE name LIKE 'SQL%'

Cf. https://docs.microsoft.com/en-us/sql/t-sql/statements/sql-server-collation-name-transact-sql?view=sql-server-ver15

With this you can have a fixed list in your json file and don't need to query this list all over again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM