139

The SQL editor in DBeaver has this unsupportable feature of transforming all capital characters into lower case. This happens as you type, the most schizophrenic thing.

I have searched in the menus and the Preferences dialogue, but I can not find the setting to this feature. How can I switch it off?

Luís de Sousa
  • 5,765
  • 11
  • 49
  • 86
  • 14
    Given that capitalizing SQL keywords is considered best-practice; e.g.: SELECT * FROM Country WHERE etc.., why would DBeaver convert to lower-case by default? Seems an odd decision... am I missing something? – kmiklas Jan 12 '22 at 23:31
  • 5
    No idea why they do this, but this is very annoying! – João Ramires Jul 18 '22 at 00:52

9 Answers9

145

Got to Preferences > General > Editors > SQL Editor > SQL Formatting. Then over under Auto Format there is a box for Convert Keyword Case.

enter image description here

Luís de Sousa
  • 5,765
  • 11
  • 49
  • 86
Onychomys
  • 1,474
  • 1
  • 10
  • 7
  • 1
    Great find Onychomys! I'm pretty sure I've searched for this setting multiple times but to no avail. – aero Nov 25 '17 at 06:59
  • 11
    Is this in the enterprise edition only? Because I don't have options for the SQL editor. EDIT: Nevermind I found it when searching for SQL Formatting, but it won't show up in the list otherwise. – rovyko Oct 29 '18 at 06:24
  • 6
    In DBeaver version 6.2.2, this option is available at Preferences > Database > Editors > SQL Editor > SQL Completion > Auto Format section > Concert keyword case – VBMali Dec 30 '19 at 12:48
  • 1
    In DBeaver 6.3.1, this option is also available, but should also check with the setting as answered by @Joel below. Otherwise, it dose not work. – zhihong Apr 19 '20 at 16:38
  • 7
    In DBeaver v21.1.5, the option is moved to: `Preferences > Database > Editors > SQL Editor > Code Editor > Auto format > Convert keyword case` – Venryx Apr 02 '22 at 18:19
  • In DBeaver v22.0.5, the option is moved to `Preferences > Editors > SQL Editor > Formatting > Settings > Keyword case`. It's almost as if they don't want us to find it … – kthy Jun 09 '22 at 07:34
  • 1
    In DBeaver Version 22.2.3 has moved to `Preferences > Editors > SQL Editor > Code Editor > Autor format` – Zuri Oct 28 '22 at 09:07
  • Welp... that made me feel dumb... Thanks! – Daniel Roy Nov 23 '22 at 21:53
39

My two cents, for Version 7.0.1.2:

  • Preferences -> DBeaver -> Editors -> SQL Editor -> SQL Formating -> Keyword case

You can dictate this behaviour. Didn't test for older versions but it seems to be there for a while.

Joel
  • 678
  • 8
  • 17
  • 6
    **Window** -> Preferences -> DBeaver -> Editors -> SQL Editor -> SQL Formating -> Keyword case In the interest of full instructions (and because as a dbeaver noob I struggled to find 'preferences' ) – Sally Levesque Sep 08 '20 at 21:20
  • 1
    in 21.1.1 it's in: "Formatting" instead of "SQL Formatting". Also you can search for 'upper' in the filter text to find it – fei0x Jul 06 '21 at 16:18
  • This option does not seem to force lowercase for uppercase named tables and columns. For example, if the database has table TABLEXYZ and you type in table..., Dbeaver will force uppercase on autocomplete regardless of the keyword case being set to lower. Some of our data eng live for ALL UPPERCASE which makes this a bit annoying. – n3rd Apr 22 '22 at 21:00
29

In the new versioning (>= 21.1.4) this feature has been moved to Window > Preferences > Editors > SQL Editor > Formatting. Change Keyword case to Upper and apply changes.

enter image description here

Adam Mańkowski
  • 767
  • 11
  • 21
23

For DBeaver 6.2.4 I've found it in:

  1. Window → Preferences → Database → Editors → SQL Editor → SQL Formatting / Keyword case option Keyword case option1

  2. Window → Preferences → Database → Editors → SQL Editor → SQL Completion/ Convert keyword case option Keyword case option2


For DBeaver 7.0.2:

  • Window → Preferences → DBeaver → Editors → SQL Editor → SQL Completion/ Convert keyword case option Convert case option
juan_carlos_yl
  • 641
  • 8
  • 14
8

As of DBeaver 5.3.5 the Convert keyword case toggle can be found under:

  • Window > Preferences and then at Database > Editors > SQL Editor > SQL Completion.
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
Rafael Renan Pacheco
  • 2,138
  • 21
  • 22
  • 2
    Is it possible to make keyword uppercase and columns, tables lowercase? ex: `SELECT first_name,last_name FROM actor;` – CSJ Aug 26 '19 at 19:14
5

Through DBeaver > 6.2.1, the Convert keyword case can be enabled or disabled through the following sequence:

  • Preferences -> DBeaver -> Editors -> SQL Editor -> SQL Completion

With new versions now is:

  • Preferences -> Database -> Database Editors -> SQL Editor -> Code Editor
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
5

On version 21.1.3, it was necessary to change in two places.

  1. Window -> Preferences -> SQLEditor -> Code Completion -> InsertCase(Change the pattern to UpperCase)
  2. Window - Preferences -> SQLEditor -> Code Editor -> Convert keyword case(Unset it)
Gabriel Silva
  • 51
  • 1
  • 5
1

In version 21.3.3.202201221033 it's under Window > Preferences > Editors > SQL Editor > Code Editor > Auto format > Convert keyword case

Rich
  • 71
  • 1
  • 4
0

The interface is slightly different in version 7.2.2, if set to default is enabled it will be lowercase. To change it to uppercase:

  • preferences -> Database Editors -> SQL Editor -> SQL Formatting -> Keyword Case
J. Ni
  • 11
  • 2