Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Inline SQL for PythonNew to Visual Studio Code? Get it now.
Inline SQL for Python

Inline SQL for Python

l1xnan

|
1,556 installs
| (0) | Free
Inline SQL for Python
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Inline SQL for Python

中文

Syntax highlight and format SQL strings embedded in Python strings.

Usage

  • Syntax highlighting: No configuration is required.
  • Format
    • Select SQL, right-click and select the 'Inline SQL Format' option.
    • Select SQL, open the command panel, select 'Inline SQL Format' action.

Python indentation can be handled automatically, example:

if cond:
    sql = """
    select * from demo1 union select * from demo2;
    """

After formatting:

# Bad:
if cond:
    sql = """
    select *
from demo1
union
select *
from demo2;
    """

# Good
if True:
    sql = """
    select *
    from demo1
    union
    select *
    from demo2;
    """

Extension Settings

Known Issues

Release Notes

1.0.0

Initial release of ...

1.0.1

Fixed issue #.

1.1.0

Added features X, Y, and Z.

Related

  • better-python-string-sql
  • SQLTools
  • Inline SQL Formatter
  • SQL Language Server
  • Inline SQL
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft