快捷键
执行sql语句:ctrl+enter
sql模板(可以自定义设置):sf、swhere、scount
格式化:ctrl+shift+f
转为大写:ctrl+shift+x
转为小写:ctrl+shift+y
放大/缩小sql编辑器的字体大小:ctrl+、ctrl-
SQL模板xml文件
使用方法,新建一个xml -> 使用下面的代码填充 -> 在界面中导入:
1 | <templates><template autoinsert="true" context="sql" deleted="false" description="" enabled="true" name="delf">delete from ${table};</template><template autoinsert="true" context="sql" deleted="false" description="删除" enabled="true" name="delw">delete from ${table} where ${column}='${value}';</template><template autoinsert="true" context="sql" deleted="false" description="select row count" enabled="true" id="org.jkiss.dbeaver.templates.scount" name="scount">select count(*) from ${table};</template><template autoinsert="true" context="sql" deleted="false" description="select * from " enabled="true" id="org.jkiss.dbeaver.templates.sf" name="sf">select * from ${table};</template><template autoinsert="true" context="sql" deleted="false" description="select with group by" enabled="true" name="sg">select * from ${table} where ${column}='${value}' group by ${column};</template><template autoinsert="true" context="sql" deleted="false" description="select with order by" enabled="true" id="org.jkiss.dbeaver.templates.scob" name="sorder">select * from ${table} t order by ${column};</template><template autoinsert="true" context="sql" deleted="false" description="select with condition" enabled="true" id="org.jkiss.dbeaver.templates.swhere" name="sw">select * from ${table} where ${column}='${value}';</template><template autoinsert="true" context="sql" deleted="false" description="" enabled="true" name="updf">update ${table} set ${column}='';</template><template autoinsert="true" context="sql" deleted="false" description="更新" enabled="true" name="updw">update ${table} set ${column}='' where ${column}='${value}';</template></templates> |
效果如下: