这本书快要学完了。感觉示例模式student值得再研究一下。
1. 查询所有表及标注释
SQL> /* Formatted on 2018/11/13 18:21:43 (QP5 v5.256.13226.35538) */
SQL> SELECT tab.table_name, com.comments
2 FROM user_tables tab, user_tab_comments com
3 WHERE tab.table_name = com.table_name
4 ORDER BY 1;
TABLE_NAME COMMENTS
---------- --------------------------------------------------------------------------------
AUDIT_TRAI
L
COURSE Information for a course.
ENROLLMENT Information for a student registered for a particular section (class).
GRADE The individual grades a student received for a particular section(class).
GRADE_CONV Converts a number grade to a letter grade.
ERSION
GRADE_TYPE Lookup table of a grade types (code) and its description.
GRADE_TYPE Information on how the final grade for a particular section is computed. For ex
_WEIGHT ample, the midterm constitutes 50%, the quiz 10% and the final examination 40% o
f the final grade.
INSTRUCTOR Profile information for an instructor.
SECTION Information for an individual section (class) of a particular course.
STUDENT Profile information for a student.
ZIPCODE City, state and zip code information.
2. 整理如下:
3. 查询Instructor表结构及注释:
/* Formatted on 2018/11/13 18:21:43 (QP5 v5.256.13226.35538) */
SELECT tab.table_name, com.comments
FROM user_tables tab, user_tab_comments com
WHERE tab.table_name = com.table_name
ORDER BY 1;
TABLE_NAME | COLUMN_NAME | COMMENTS | 中文 |
INSTRUCTOR | INSTRUCTOR_ID | The unique ID for an instructor. | 讲师ID |
INSTRUCTOR | SALUTATION | This instructor's title (Mr., Ms., Dr., Rev., etc.) | 讲师称呼语(先生、夫人等) |
INSTRUCTOR | FIRST_NAME | This instructor's first name. | 讲师名字(不包括姓) |
INSTRUCTOR | LAST_NAME | This instructor's last name | 讲师姓氏 |
INSTRUCTOR | STREET_ADDRESS | This Instructor's street address. | 讲师地址 |
INSTRUCTOR | MODIFIED_DATE | Audit column - date of last update. | 审计列——修改日期 |
INSTRUCTOR | PHONE | The phone number for this instructor including area code. | 讲师电话号码(包括区号) |
INSTRUCTOR | CREATED_BY | Audit column - indicates user who inserted data. | 审计列——该条记录的创建者 |
INSTRUCTOR | CREATED_DATE | Audit column - indicates date of insert. | 审计列——该条记录的创建日期 |
INSTRUCTOR | MODIFIED_BY | Audit column - indicates who made last update. | 审计列——该条记录的最近修改日期 |
INSTRUCTOR | ZIP | The postal zip code for this instructor. | 讲师邮政编码 |