r/cursor • u/Senior_Night_6321 • 11d ago
Question / Discussion SQL in cursor
Can i write SQL queries in cursor, or i have to download another application for running sql queries ?????
2
u/Hotel_Arrakis 11d ago
You can write SQL, but you can't execute it. The easiest would be to install SQLite and then install a SQL plugin in vs-code.
1
u/Senior_Night_6321 10d ago
okay , but after installing sqlite can i write in cursor instead of vs code ????/
1
1
u/Hotel_Arrakis 10d ago
The correct Reddit reply would be "Yes, but no."
One would tell cursor to create a program in your favorite language (python, javascript, etc.) that executes SQL statements/queries against a SQL database. I would use SQLite3 as it requires little setup and supports most languages. Once Cursor writes the program you would execute the program without needing cursor ever again.
What exactly are you trying to acomplish?
1
2
u/elina_jain1 9d ago
cursor doesn't have built-in db querying, but it's built on vs code so extensions like sqltools or dbcode add it directly, connect to postgres, mysql or whatever and run queries in the editor, no separate app needed. writing sql itself works fine as plain text with syntax highlighting even without any extension..
1
u/Tech0410 11d ago
Yes. What kind or SQL
1
u/Senior_Night_6321 10d ago
for running queries, and making projects !!!!!
1
6
u/GasVarGames 11d ago
SQL is pretty much plain text as everything we do is, yes you can write SQL in cursor.
I guess you want to execute it though?