Skip to content

SQL capitalization identifier

Tako Lee edited this page Feb 20, 2014 · 39 revisions

Set identifier to preferred case option.

```SQL
SELECT department_id, 
       Min( salary )  
FROM   employees  
GROUP  BY department_id  
```
  • Quoted identifier

    SELECT [department_id], 
           Min( [salary] )  
    FROM   [employees]  
    GROUP  BY [department_id]  
  • Prefixed identifier

    Prefixed identifier is user defined identifier. For example, you can define identifier start with fn_ as SQL Server system function. This format option apply to all prefixed identifiers.

    SELECT *
    FROM fn_virtualfilestats(DB_ID(N'AdventureWorks2012'), 2);
  • Table name

  • Column name

  • Function name

  • Alias

  • Datatype

  • Variable

Clone this wiki locally