• http://db.grussell.org 测试答案 1


    Tutorial 1, page 1 Context: jobs Engine: oracle

    To follow this tutorial you need to be able to find tables stored in the database. Each database system has a different way of doing this. In this environment you can type

     CAT;

    as an SQL command, and it will show you a list of tables which belong to the database relevent to the question being asked.

    Use the cat command to identify the tables which belong to the database used for this question.

    cat;
    TABLENAME TABLETYPE
    course TABLE
    department TABLE
    empcourse TABLE
    employee TABLE
    jobhistory TABLE

    2
    Tutorial 1, page 2 Context: jobs Engine: oracle

    The CAT command is strictly a command possible only in this interface, and is not available on standard database systems. Each database system has its own approach. For instance in MySQL, you would type the command "show tables".

    The main database for these tutorials is an Oracle system. The standard command in Oracle is

    SELECT * FROM cat;
                

    This command shows all database objects which a particular user has access to. Try the command and see what is produces.

    SELECT * FROM cat;

    TABLE_NAME TABLE_TYPE
    EMPCOURSE SYNONYM
    JOBHISTORY SYNONYM
    EMPLOYEE SYNONYM
    DEPARTMENT SYNONYM
    COURSE SYNONYM
    CONSTRUCTION SYNONYM
    DRESSMAKER SYNONYM
    ORDER_LINE SYNONYM
    DRESS_ORDER SYNONYM
    QUANTITIES SYNONYM
    MATERIAL SYNONYM
    GARMENT SYNONYM
    JMCUST SYNONYM
    TCUST SYNONYM
    TSHIPD SYNONYM
    TSUPL SYNONYM
    MOVIE SYNONYM
    MUSICIAN SYNONYM
    COMPOSER SYNONYM
    TSHIP SYNONYM
    PERMIT SYNONYM
    ROUTE SYNONYM
    TRETN SYNONYM
    TPURC SYNONYM
    TPROD SYNONYM
    CASTING SYNONYM
    VEHICLE SYNONYM
    MSP SYNONYM
    RECEIPT SYNONYM
    PERFORMER SYNONYM
    BAND SYNONYM
    BADGUY SYNONYM
    PLACE SYNONYM
    PLAYS_IN SYNONYM
    TOTP SYNONYM
    COMPOSITION SYNONYM
    CONCERT SYNONYM
    SHIPPED SYNONYM
    TSTCK SYNONYM
    TDLVR SYNONYM
    CIA SYNONYM
    HAS_COMPOSED SYNONYM
    CAMERA SYNONYM
    PARTY SYNONYM
    IMAGE SYNONYM
    ACTOR SYNONYM
    TDLVRD SYNONYM
    STOPS SYNONYM
    PRODUCT SYNONYM
    TPURCD SYNONYM
    ++ TRUNCATED ++
    3
    Tutorial 1, page 3 Context: jobs Engine: oracle

    Each table in the database has a number of columns. These columns are known as attributes. To list attributes you use the SELECT command, listing all the attribute you are interested in (separated by commas) followed by FROM and then the name of the table. For instance, listing the attributes empno and surname from a table called employee would be:

    SELECT empno,surname FROM employee;
                

    Notice when you run the SQL the result is shown and then the computer assesses you answer. Make sure it shows 100% correct before trying the next question.

    Try listing all course titles (the "cname" attribute) of the table "course".


    select cname
    from course
    CNAME
    Basic Accounting
    Further Accounting
    Issues In Administration
    More Administration
    Ada
    Introduction To Ingres
    New Topologies
    LANs
    Structural Stress Analysis
    Taffic Flow Analysis
  • 相关阅读:
    整理了一份FAQ,新手看一下
    分享:pythonbitstring 3.1.2 发布
    分享:TokuDB v7 发布,并宣布全面开源
    在美国学CS能挣多少钱?美国IT公司标准 offer package详细数字及绿卡政策 | 美国留学申请与就业找工作咨询博客|Warald|一亩三分地论坛
    写的split带改进
    分享:一个多进程并发执行程序ps命令 ls命令
    分享:vi/vim使用进阶: 指随意动,移动如飞 (一)
    waning rm i rm rvfi
    分享:C++中头文件、源文件之间的区别与联系
    分享:神奇的动归状态转移方程——最优子序列
  • 原文地址:https://www.cnblogs.com/bo8888/p/592654.html
Copyright © 2020-2023  润新知