add view document

This commit is contained in:
XudongXie 2024-09-13 16:09:24 +08:00
parent 449b54cf6c
commit 3e95820c1f
2 changed files with 18 additions and 16 deletions

View File

@ -4,12 +4,7 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="d8d12963-4777-48e3-9669-309cf5e41d60" name="更改" comment="add alter">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/Lexer/OracleLexer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Lexer/OracleLexer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Main.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/Parser/OracleParser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Parser/OracleParser.java" afterDir="false" />
</list>
<list default="true" id="d8d12963-4777-48e3-9669-309cf5e41d60" name="更改" comment="fix some bugs" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -106,13 +101,6 @@
<option name="presentableId" value="Default" />
<updated>1723106789329</updated>
</task>
<task id="LOCAL-00008" summary="revise">
<created>1724165028837</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1724165028837</updated>
</task>
<task id="LOCAL-00009" summary="revise">
<created>1724165047441</created>
<option name="number" value="00009" />
@ -449,7 +437,14 @@
<option name="project" value="LOCAL" />
<updated>1726212919328</updated>
</task>
<option name="localTasksCounter" value="57" />
<task id="LOCAL-00057" summary="fix some bugs">
<created>1726214700141</created>
<option name="number" value="00057" />
<option name="presentableId" value="LOCAL-00057" />
<option name="project" value="LOCAL" />
<updated>1726214700141</updated>
</task>
<option name="localTasksCounter" value="58" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -464,7 +459,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="coding" />
<MESSAGE value="finish the framework of sqltranslate (createTab sql is now being supported!)" />
<MESSAGE value="add insert sql" />
<MESSAGE value="add todolist" />
@ -489,7 +483,8 @@
<MESSAGE value="add alter table parser" />
<MESSAGE value="revise" />
<MESSAGE value="add alter" />
<option name="LAST_COMMIT_MESSAGE" value="add alter" />
<MESSAGE value="fix some bugs" />
<option name="LAST_COMMIT_MESSAGE" value="fix some bugs" />
</component>
<component name="XDebuggerManager">
<watches-manager>

View File

@ -0,0 +1,7 @@
CREATE [OR REPLACE] VIEW view_name [(column_name [, column_name]...)] AS SELECT_statement;
Example:
CREATE OR REPLACE VIEW employee_details AS SELECT first_name, last_name, salary FROM employees;
| CREATE OR REPLACE VIEW emp_info (full_name, pay) AS SELECT first_name || ' ' || last_name AS full_name, salary AS pay FROM employees;
| CREATE OR REPLACE VIEW emp_dept_info AS SELECT e.first_name, e.last_name, d.department_name FROM employees e JOIN departments d ON e.department_id = d.department_id;
| CREATE OR REPLACE VIEW high_salary_employees AS SELECT first_name, last_name, salary FROM employees WHERE salary > 50000;