Using a Single Row configuration table in SQL Server database. Bad idea?

后端 未结 12 1955
终归单人心
终归单人心 2020-12-12 09:19

In developing a shopping cart application I\'ve found that I needed to save settings and configurations based on the administrator\'s preferences and requirements. This info

12条回答
  •  庸人自扰
    2020-12-12 09:56

    A Key and Value pair is similar to a .Net App.Config which can store configuration settings.

    So when you want to retrieve the value you could do:

    SELECT value FROM configurationTable
    WHERE ApplicationGroup = 'myappgroup'
    AND keyDescription = 'myKey';
    

提交回复
热议问题