Hi @aagha !
Here’s how I paste SQL into Obsidian:
First, I create a code block that looks like the following:
```sql
```
Then I copy the SQL query from my source (say, a web page). Then I paste the text --unformatted – into the code block using CTRL-SHIFT-V (on Linux and Windows, might be different on Mac). Now the text block looks like this:
```sql
SELECT empid,
name,
dno,
salary,
job,
CORR(SYSDATE - joiningdate, salary) OVER () AS my_corr_val
FROM employee;
```
Pasting unformatted using CTRL-SHIFT-C is important so that Obsidian doesn’t try to re-format the code. Pasting using the regular CTRL-C will cause the code to have a bunch of newlines and other decorations.
Hope this helps!
Craig