Решения практических упражнений дисциплины "Теория экономических информационных систем", страница 9

Результат:

Server: Msg 128, Level 15, State 1, Line 3

The name 'nextval' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.

Server: Msg 105, Level 15, State 1, Line 12

Unclosed quotation mark before the character string ');

'.

     ALTER SEQUENCE CC_SEQUENCE

     MAXVALUE  10000;

Результат:

Server: Msg 170, Level 15, State 1, Line 1

Line 1: Incorrect syntax near 'SEQUENCE'.

     DESCRIBE CC_VIEW

Результат:

Server: Msg 2812, Level 16, State 62, Line 1

Could not find stored procedure 'DESCRIBE'.

     INSERT INTO CC_VIEW

     VALUES

      (1283738', 'Н667 JRG',7902,20);

Результат:

Server: Msg 170, Level 15, State 1, Line 3

Line 3: Incorrect syntax near ', '.

Server: Msg 105, Level 15, State 1, Line 3

Unclosed quotation mark before the character string ',7902,20);

'.

     CREATE TABLE   ЕМР2

      AS         

     SELECT                *

     FROM                    ЕМР ;

Результат:

Server: Msg 156, Level 15, State 1, Line 2

Incorrect syntax near the keyword 'AS'.

    UPDATE                 ЕМР2 

    SET                        HIREDATE = '01-JUN-95';

Результат:

Без ошибок

     UPDATE                ЕМР2

     SET                       SAL = (SELECT         AVG (SAL)

                                                FROM            ЕМР

                                                WHERE    EMP.DEPTNO = ЕМР2. DEPTNO);

Результат:

Без ошибок

      CREATE   TABLE ЕМР3

      AS

      SELECT               *

      FROM                   EMP2;

Результат:

Server: Msg 156, Level 15, State 1, Line 2

Incorrect syntax near the keyword 'AS'.

      DELETE FROM EMP2;

Результат:

Без ошибок

TRUNCATE TABLE ЕМРЗ;

Результат:

Без ошибок

      DROP TABLE ЕМР3;


      DESCRIBE ЕМР3

Результат:

Server: Msg 170, Level 15, State 1, Line 3

Line 3: Incorrect syntax near 'DESCRIBE'.

      DROP TABLE &tablename;

Результат:

Server: Msg 170, Level 15, State 1, Line 1

Line 1: Incorrect syntax near '&'.

    SQL> SET FEED OFF

    SQL> SET HEAD OFF
    SQL> SPOOL DROP_TABLES.LST

    SQL> SELECT 'DROP TABLE ' I I TABLE_NAME l l ' ; '

          2   FROM          USER_TABLES

          3   WHERE       TABLE_NAME NOT IN

          4            ( ‘ЕМР’ , ' DEPT ' , 'SALGRADE ' , 'COMPANY_CARS ' )
          5   /

    DROP TABLE EMP2;        
    DROP TABLE ЕМР3;
    DROP TABLE TEMP;

Результат:

Server: Msg 170, Level 15, State 1, Line 1

Line 1: Incorrect syntax near '>'.

Server: Msg 195, Level 15, State 1, Line 1

'FEED' is not a recognized option.

Server: Msg 195, Level 15, State 1, Line 2

'HEAD' is not a recognized option.

Server: Msg 170, Level 15, State 1, Line 4

Line 4: Incorrect syntax near 'I'.

Решения упражнений: урок 19

     CREATE                SYNONYM СС

     FOR                       COMPANY_CARS;

     Synonym created.

     SELECT                *

     FROM                    СС;

Результат:

Server: Msg 170, Level 15, State 1, Line 1

Line 1: Incorrect syntax near 'SYNONYM'.

     SELECT                SYNONYM_NAME

     FROM                    USER_SYNONYMS;

Результат:

Server: Msg 208, Level 16, State 1, Line 1

Invalid object name 'USER_SYNONYMS'.

    DROP SYNONYM СС;

Результат:

Без ошибок

    SELECT                 *                  

    FROM                     USER_ROLE_PRIVS ;

Результат:

Server: Msg 208, Level 16, State 1, Line 1

Invalid object name 'USER_ROLE_PRIVS'.

    SELECT                 *

    FROM                     ROLE_SYS_PRIVS

    WHERE                              ROLE = ' COURSE ' ;

Результат:

Server: Msg 208, Level 16, State 1, Line 1

Invalid object name 'ROLE_SYS_PRIVS'.