![]() Well, and Oracle, hm, they just use meta commands that might look as SQL commands. MySQL has the same backslash concept, SQLite uses the period for "meta" commands. Meta-commandsĪre more commonly called slash or backslash commands. ![]() Make psql more useful for administration or scripting. Psql meta-command that is processed by psql itself. Man psql wrote:Anything you enter in psql that begins with an unquoted backslash is a Then you can examine at least 20 other commands available in the same section with your mouse (producing standard, interactive SQL) that DESCRIBE your database in ways that should make your friend's head spin. The H2 Console even gives you a list of available options as you type, but it's not a true auto-complete function like you'll find in more advanced tools. SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'TEST' You can add a WHERE clause to the command to make it more exclusive, such as to display a single table or schema: We can examine an equivalent to the DESC command by clicking on:Īnd watch as the H2 Console pre-fills the necessary SQL command(s) for you.Īnd you'll get a table with 5x the information available through the Oracle DESC command. It's good to learn extended functions of individual database engines, such as Oracle's DESC command or H2's SHOW command, but that process should be viewed as a distraction from learning authentic SQL in the early phases. And in the process, you get to see and interact with ANSI-standard SQL while also being introduced to the ANSI-standard INFORMATION_SCHEMA. But you actually have the more powerful command-set for such administrative tasks available through mouse-clicks in the H2 Console under the INFORMATION SCHEMA section. Your friend may have been showcasing Oracle's SQL*Plus tool by introducing you to the Oracle DESC command. The H2 Console places a plethora of database administration commands at your finger-tips with the click of a mouse - which pre-fills a GUI text editor with the corresponding SQL query. So long story short, you could theoretically create your own DESCRIBE command in Java for use with H2.īut lets get real. ![]() HSQLDB 2.x adds support for internally-stored SQL procedures. H2 and HSQLDB 1.8 support external Java stored procedures through Triggers. Others store the custom commands internally for use similar to ordinary SQL commands. ![]() Some store the code externally as a text file and require Triggers to run the command. Many RDBMS's support this functionality in one form or another. It's more accurate to characterize them in the realm of " procedural extensions" which Oracle dubs "PL/SQL." These extensions allow you to create your own commands - perhaps like the DESCRIBE command - using existing SQL commands and programming logic (such as to parse the custom command). The Oracle and MySQL DESCRIBE commands are not really SQL, because they're non-standard. Bhujang wrote:Why one software is supporting DESC command while others are not,I think when DESC is a SQL command all softwares should support this. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |