I am learning SQL but I have not been able to figure out what is us开发者_开发知识库ed to compile and run SQL code.
SQL isn't compiled into an executable.
SQL is designed to query information from a database, so in order to use it, you need a DBMS you can query.
An example of such a system could be PostgreSQL, MySQL or SQLite.
The simplest in way of installation would probably be SQLite.
In order to then use the system, you could either open a console and do a query manually or, more likely, use a database driver in a programming language of your choice and perform a query through that, letting your program work on the data automatically.
For instance, in Java you have JDBC, in PHP you have PDO, and so forth.
Try SQLite, it requires no installation and is very easy to get started with. The documentation is also very easy to follow. You cannot compile SQL it is a query language and is understood by a database.
usually you do not compile sql.
it is a command line scripting language
tools like sqlplus for oracle are the interface
usually the database systems have a console where you can type your sql code or commands. Some have more polished editors where it helps you to create the sql code. It depends on which database you use but each usually has different tools to enter code.
In PostgreSQL you use a command line window. Type i\ along with the script file location and file name and then hit enter.
You don't have to compile SQL query, it is interpreted on the database management system (dbms) side. When you send your SQL statement to the dbms the query will be run. For learning purposes you can use online service to run SQL queries.
There is a stack exchange service @ https://data.stackexchange.com/stackoverflow/queries where you can see SQL queries.
Let's take a look at the SQL query https://data.stackexchange.com/stackoverflow/query/163779. You can see it is in plain text (not compiled).
This question is not as daft as most responders seem to think it is.
With technologies such as Linq in .Net, it is not unreasonable to want something that takes a SQL expression and emits IL or its equivalent.
A user-configurable query that can hook in, at runtime, to the power of Linq would be tremendously valuable. Kind of the opposite of Linq To SQL
........ I think the answer would be Microsoft Visual Studio or AutoCAD for you...based on your profile. AutoCAD uses VBA to communicate with SQL Server natively. The file format would be .dvb and that is a compiled file. Visual Studio supports VB.NET , where you can not write .NET applications inside AutoCAD using the VBAIDE command at this time....Visual Studio allows you to write in C# or VB.NET. Both languages can compile your SQL Server requests into .dll files. You would then need to load them into AutoCAD using the NETLOAD command. If you have code from VB 6.0, you will need to export your modules out of AutoCAD so that Visual Studio can read the file.....in other words VS can not read a .dvb file.
VBAIDE command will only handle COM. It can not handle managed VB programming.
精彩评论