Injecting SQL into a Python String using PyCharm

2019-09-13 03:46发布

问题:

How do you inject SQL into a Python string and get auto-complete in PyCharm?

回答1:

SQL language injection is supported starting with PyCharm 3.0 (it was not supported at the time this question was asked).

The details can be found at Using Language Injections.



回答2:

Several ways:

  1. Alt+Enter on a string -> Inject language or reference -> choose needed SQL

  2. Write a comment in that way:



标签: sql pycharm