The CSQL Interpreter is a program used in CUBRID. The entered SQL statements and results can be stored in the file for later use. For more information Introduction to the CSQL Interpreter and CSQL Execution Mode.
CUBRID offers the "CUBRID Manager" program, a convenient GUI program. All SQL can be executed and the results can be viewed from the CUBRID Manager’s query editor. For more information, see CUBRID Manager manual or online manual.
In this section, we will provide information on using the CSQL Interpreter on Linux.
The CSQL program can be started in the shell as shown below.
% csql demodb
CUBRID SQL Interpreter
Type ';help' for help messages.
csql> ;help
=== <Help: Session Command Summary> ===
All session commands should be prefixed by ';' and only blanks/tabs
can precede the prefix. Capitalized characters represent the minimum
abbreviation that should be entered to execute the specified command.
;REAd [<file-name>] - read a file into command buffer.
;Write [<file-name>] - (over)write command buffer into a file.
;APpend [<file-name>] - append command buffer into a file.
;PRINT - print command buffer.
;SHELL - invoke shell.
;CD - change current working directory.
;EXit - exit program.
;CLear - clear command buffer.
;EDIT - invoke system editor with command buffer.
;List - display the content of command buffer.
;RUn - execute sql in command buffer.
;Xrun - execute sql in command buffer,
and clears the command buffer.
;COmmit - commit the current transaction.
;ROllback - roll back the current transaction.
;AUtocommit [ON|OFF] - enable/disable auto commit mode.
;REStart - restart database.
;SHELL_Cmd [shell-cmd] - set default shell, editor, print and pager
;EDITOR_Cmd [editor-cmd] command to new one, or display the current
;PRINT_Cmd [print-cmd] one, respectively.
;DATE - display the local time, date.
;DATAbase - display the name of database being accessed.
;SChema class-name - display schema information of a class.
;SYntax [sql-cmd-name] - display syntax of a command.
;TRigger [`*'|trigger-name] - display trigger definition.
;Get system_parameter - get the value of a system parameter.
;SEt system_parameter=value - set the value of a system parameter.
;PLan [simple|detail|off] - show query execution plan.
;Info <command> - display internal information.
;TIme [ON/OFF] - enable/disable to display the query
execution time.
;HISTORYList - display list of the executed queries.
;HISTORYRead <history_num> - read entry on the history number into command buffer.
;HElp - display this help message.
csql>