• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/22

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

22 Cards in this Set

  • Front
  • Back
  • 3rd side (hint)

Check if a table exists in the current database schema...

SELECT table_name


FROM user_tables


WHERE table_name = 'TABLE_NAME'

Select statement

Check if a column exists in a table...

SELECT column_name AS FOUND


FROM user_tab_cols


WHERE table_name = 'TABLE_NAME' AND column_name = 'COLUMN_NAME';

Select statement

Change current schema...

ALTER SESSION SET CURRENT_SCHEMA = new_schema;

Alter statement

Statement to return Oracle database version

SELECT * FROM v$version;

Select statement

Evaluate the following query:



SELECT TRUNC(ROUND(156.00,-1),-1)


FROM DUAL;

160

The first DROP operation is performed on PRODUCTS table using the following command:



DROP TABLE products PURGE;



Then you performed the FLASHBACK operation by using the following command:


FLASHBACK TABLE products TO BEFORE DROP;



Describe the outcome of the FLASHBACK statement...


It is not possible to recover the table structure, data, or the related indexes.

True or False:



Group functions can be used on columns or expressions

True

True or False:



Group functions can be passed as an argument to another function.

True

True or False:



Group functions can be used only with a SQL statement that has a GROUP BY clause.

False

True or False:



Group functions can be used on only one column in the SELECT clause of a SQL statement.

False

True or False:



Group functions can be used along with the single-row function in the SELECT clause of a SQL statement.

True

True or False:



The data dictionary is created and maintained by the database administrator.

False

True or False:



The data dictionary views consist of joins of dictionary base tables and user-defined tables

False

True or False:



The usernames of all the users including the database administrators are stored in the data dictionary.

True

True or False:



The USER_CONS_COLUMNS view should be queried to find the names of the columns to which a constraint applies

True

True or False:



both USER_OBJECTS and CAT views provide the same information about all the objects that are owned by the user.

False

True or False:



Views with the same name but different prefixes, such as DBA, ALL, and USER, use the same base tables from the data dictionary.

True.

What are Group functions in Oracle?

Group functions (a.k.a Aggregate functions) are built-in SQL functions that operate on groups of rows and return one value for the entire group. These functions include: COUNT, MAX, MIN, AVG, SUM, DISTINCT

Describe "Database Schema"

A database schema is a collection of metadata that describes the relationship between the data in the database. A schema can be simply described as the "layout" of a database or the blueprint that outlines how data is organized into tables.

Describe "Schema Objects"

Schema objects are database objects that contain data or that govern or perform operations on data. By definition, each schema object belongs to a specific schema. Common schema objects include: tables, indexes, and views.

True or False:



Wildcard characters are only meaningful if the operator is LIKE or NOT LIKE

True

True or False:



Text cannot be combined with a column value using the concatenation operator unless single quotes surround the text.

True