Tuesday, February 27, 2007

Introduction to Oracle9i: SQL (5)

Displaying data from multiple tables

  • A variable with a single ‘&’ (ampersand) will prompt the user for the number of times that the variable occurs in the query. A variable with a double ‘&&’ will prompt the user for a value only once even if the variable occurs a number of times in the query.
  • Ttitle is used for page headings. Btitle is used for page footers. Repheader is used for report headings. Repfooter is used for report footers.
  • ‘CLEAR’ command is used to clear customizations on a column. ‘Cl Buff’ is the command to clear the buffer.
  • CHAR datatype has a maximum size of 2000 bytes. Varchar datatype has a maximum size of 4000 bytes. There is no default size for VARCHAR. Default Char size is 1 byte.
  • ACCEPT TABLE PROMPT ‘table to view foreign key constraint’
    SELECT CONSTRAINT_NAME FROM user_constraints
    WHERE table_name = UPPER(‘&table’)AND constraint_type = ‘R’;

Read more!

No comments: