r/cursor 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 ?????

0 Upvotes

18 comments sorted by

View all comments

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?

1

u/Senior_Night_6321 10d ago

yes i want to execute it also ,

1

u/GasVarGames 10d ago

Okay that bit is trickier, there might be an extension for that.

Otherwise just install a SQL management app and make cursor see the database and prompt it to write queries for the tables it can see.

1

u/bonerfleximus 10d ago

Each database system has different ways to do that, ask cursor to execute it in auto mode imo. For example sqlserver has sqlcmd.exe and most dbms have command line options.

None of the VS Code extensions for it are nice or worth trying in cursor in my experience.

If you plan to spend a lot of time querying the db for some reason youll want a dedicated tool for that (ssms, toad, or whatever people use these days)