UMBC CMSC 461 Spring '99 CSEE | 461 | 461 S'99 | lectures | news | Oracle Help | help

Table of Contents

  1. How do you find out what tables you have?
  2. How can you find out how a table is defined?
  3. Does it matter what case?
  4. Does it matter how many lines I use?
  5. How do I change me password
  6. How do I execute a stored Procedure
  7. How do I find compilation errors

How do you find out what tables you have?

SQL> select owner, table_name
  2  from all_tables;

OWNER                          TABLE_NAME
------------------------------ ------------------------------
SYS                            DUAL
SYS                            SYSTEM_PRIVILEGE_MAP
SYS                            TABLE_PRIVILEGE_MAP
SYS                            STMT_AUDIT_OPTION_MAP
SYS                            AUDIT_ACTIONS
SYS                            PSTUBTBL
SYSTEM                         DEF$_TEMP$LOB
BURT                           CUSTOMER
BURT                           BRANCH
BURT                           ACCOUNT
BURT                           DEPOSITOR

11 rows selected.
Back to the Top

How can you find out how a table is defined?

 SQL> desc account
 Name                            Null?    Type
 ------------------------------- -------- ----
 ACCOUNT_NUMBER                  NOT NULL CHAR(10)
 BRANCH_NAME                              CHAR(15)
 BALANCE                                  NUMBER(12,2)
Back to the Top

Does it matter what case?

SQL> desc account
 Name                            Null?    Type
 ------------------------------- -------- ----
 ACCOUNT_NUMBER                  NOT NULL CHAR(10)
 BRANCH_NAME                              CHAR(15)
 BALANCE                                  NUMBER(12,2)

SQL> DESC account
 Name                            Null?    Type
 ------------------------------- -------- ----
 ACCOUNT_NUMBER                  NOT NULL CHAR(10)
 BRANCH_NAME                              CHAR(15)
 BALANCE                                  NUMBER(12,2)

SQL> DESC ACCOUNT
 Name                            Null?    Type
 ------------------------------- -------- ----
 ACCOUNT_NUMBER                  NOT NULL CHAR(10)
 BRANCH_NAME                              CHAR(15)
 BALANCE                                  NUMBER(12,2)


SQL> insert into account  values ('A-23', 'Perryville', 1200.00);

1 row created.

SQL> INSERT INTO ACCOUNT VALUES ('A-24', 'Perryville', 600);

1 row created.
Back to the Top

Does it matter how many lines I use?

SQL> select * from account;

ACCOUNT_NU BRANCH_NAME        BALANCE
---------- --------------- ----------
A-23       Perryville            1200
A-24       Perryville             600

SQL> select *
  2  from account;

ACCOUNT_NU BRANCH_NAME        BALANCE
---------- --------------- ----------
A-23       Perryville            1200
A-24       Perryville             600
Back to the Top

How do I change my password?

grant connect to identified by ;

Example:

grant connect to burt identfied by gizmo;
Back to the Top

How do I execute a stored Procedure

To execute a stored procedure named register without any arguments:

SQL>EXECUTE REGISTER

To execute a stored procedure named register with one argument:

SQL>EXECUTE REGISTER(27)

Back to the Top

How do I find compilation errors

When you use CREATE to create a stored procedure, a message appears if there are compilation errors. To view these errors, you use SHOW ERRORS. For example, if you were trying to compile a procedure with the name of assignvl and got a message like:

Warning: Procedure created with compilation errors. Then try: SQL> SHOW ERRORS PROCEDURE ASSIGNVL

Back to the Top


CSEE | 461 | 461 S'99 | lectures | news | help

last modified on Monday, 26-Apr-1999 22:01:26 EDT