ZT: SQL * Plus common command and decode () function usage skills

xiaoxiao2021-03-06  108

Function: ????? decode (condition, value 1, translation value 1, value 2, translation value 2, ... value n, translation value n, default)

?

FUNCTION ????????????????????????? Result

Concat ('good', 'string') ??????????????????? 'good string'

Substr ('string', 1, 3) ???????????????????? Str '

Length ('string') ????????????????????????? 6

INSTR ('string', 'r') ???????????????????????? 3

Lower ('sql course') ????????????????? 'SQL Course'

Upper ('sql course') ?????????????????? 'sql course'

INITCAP ('sql course') ??????????????? 'sql? Course'

Round (45.926, 2) ??????????????????????????? 45.93

Trunc (45.926, 2) ???????????????????????????? 45.92

MOD (1000, 300) ?????????????????????????????????

?

SQL * Plus Common Command: SQL> Edit S If the current directory does not exist, the S.SQL file is automatically generated, SQL> @S The system will automatically query all the tables under the current user, View, synonym. The @@ file name calls a .sql file when calling a .sql file, using the SAVE file name, using the Save file name, the default file extension, the default file name, the SQL file, the SQL file, the SQL file, the SQL file, the SQL file, the SQL file, the SQL file, the SQL file, the SQL file, START file name, run adjustment Entering the SQL file SPOOL file name of the memory to the various operations and execution results "Spoolers" ready-to-disk file, the default file extension is .lstspool Display the current "spool" status spool off output Example: SQL> Spool Asql> Spool Positive Offline to a.lstsql> Spool Offsql> Spool Current Unusal Offline EXIT Exit SQL * Plusdesc Table Name Display Table Structure Show User Display Current Connection User Show Error Show Error SHOW ALL Display All 68 system variable values ​​EDIT open the default editor, the default is NOTEPAD.exe in the Windows system, and the last SQL statement in the buffer is transferred to the AfIedt.buf file for editing the Edit file name to specify the .sql file specified in the current directory. Turn into the editor to edit Clear Screen Clear Current Screen Display

转载请注明原文地址:https://www.9cbs.com/read-126324.html

New Post(0)