Using DDL Statements to Create and Manage Tables ( Section 2)

Descripción

Databases
Craig Willey
Test por Craig Willey, actualizado hace más de 1 año
Craig Willey
Creado por Craig Willey hace alrededor de 4 años
39
0

Resumen del Recurso

Pregunta 1

Pregunta
A table is which of the following?
Respuesta
  • A schema object
  • A nonschema object
  • A role
  • All of these

Pregunta 2

Pregunta
Which of the following are schema objects? (Choose all that apply.)
Respuesta
  • SEQUENCE
  • PASSWORD
  • INDEX
  • ROLE

Pregunta 3

Pregunta
A CONSTRAINT is assigned to which of the following?This
Respuesta
  • TABLE
  • SYNONYM
  • SEQUENCE
  • INDEX

Pregunta 4

Pregunta
Which of the following are valid CREATE TABLE statements? (Choose three.)
Respuesta
  • CREATE TABLE $ORDERS (ID NUMBER, NAME VARCHAR2(30));
  • CREATE TABLE CUSTOMER_HISTORY (ID NUMBER, NAME VARCHAR2(30));
  • CREATE TABLE "Boat Inventory" (ID NUMBER, NAME VARCHAR2(30));
  • CREATE TABLE workSchedule (ID NUMBER, NAME VARCHAR2(30));

Pregunta 5

Pregunta
Which of the following options can be used with the reserved word CREATE to form the beginning of a complete SQL statement? (Choose three.)
Respuesta
  • TABLE
  • VIEW
  • CONSTRAINT
  • SEQUENCE

Pregunta 6

Pregunta
You are logged in to user FINANCE. It is currently the only schema in the entire database. The following exist in the database: A VIEW named VENDORS A CONSTRAINT named VENDORS An INDEX named CUSTOMER#ADDRESS
Respuesta
  • The question is flawed because you cannot have an INDEX named CUSTOMER#ADDRESS.
  • The question is flawed because you cannot have a VIEW and a CONSTRAINT with identical names in the same schema.
  • The SQL statement will fail to execute and result in an error message because you cannot create a TABLE name with the # character.
  • The SQL statement will fail to execute and result in an error message because you cannot create a TABLE that has the same name as an INDEX in the same schema.
  • The SQL statement will execute, and the TABLE will be created.

Pregunta 7

Pregunta
You have a single database, with only one schema. The following four objects exist in the database: A TABLE named PRODUCT_CATALOG A TABLE named ADS A USER named PRODUCT_CATALOG A VIEW named CONFERENCE_SCHEDULE How many of the four objects are owned by the schema?
Respuesta
  • 0
  • 2
  • 3
  • 4

Pregunta 8

Pregunta
Which of the following is true about ROLES?
Respuesta
  • Roles are schema objects but only when created from within a user account.
  • Roles are in the same namespace as CONSTRAINTS.
  • Roles are in the same namespace as TABLES.
  • Roles are in the same namespace as USERS.

Pregunta 9

Pregunta
The DESC command can be used to do which of the following?
Respuesta
  • Show a table's columns and the data types of those columns
  • Show a brief paragraph describing what the table does
  • Show a table's name and who created it
  • Show the data that is contained within a table

Pregunta 10

Pregunta
Which one of the following is true?
Respuesta
  • The execution fails because there is no precision indicated for NUMBER.
  • The execution fails because there is no precision indicated for VARCHAR2.
  • The execution fails because there is no precision indicated for CHAR.
  • The execution succeeds, and the table is created.

Pregunta 11

Pregunta
What is the displayed output of the SELECT statement?
Respuesta
  • 3.1415
  • 3.142
  • 3.141
  • None of these

Pregunta 12

Pregunta
Which of the following SQL statements creates a table that will reject attempts to INSERT a row with NULL values entered into the POSITION_ID column?
Respuesta
  • CREATE TABLE POSITIONS (POSITION_ID NUMBER(3), CONSTRAINT POSITION_CON UNIQUE (POSITION_ID));
  • CREATE TABLE POSITIONS (POSITION_ID NUMBER(3), CONSTRAINT POSITION_CON PRIMARY KEY (POSITION_ID));
  • CREATE TABLE POSITIONS (POSITION_ID NUMBER(3), CONSTRAINT POSITION_CON REQUIRED (POSITION_ID));
  • None of these

Pregunta 13

Pregunta
Assume there is no table already called SHIPPING_ORDER in the database. What will be the result of an attempt to execute the preceding SQL statement?
Respuesta
  • The statement will fail because the data type for ORDER_YEAR is a CHAR, and CHAR data types aren't allowed in a PRIMARY KEY constraint.
  • The statement will fail because there is no precision for the ORDER_ID column's data type.
  • The table will be created, but the primary key constraint will not be created because the name does not include the _PK suffix.
  • The statement will succeed: the table will be created, and the primary key will also be created.

Pregunta 14

Pregunta
Assume there is no table already called PERSONNEL in the database. What will be the result of an attempt to execute the preceding SQL statement?
Respuesta
  • The statement will fail because you cannot create two primary key constraints on the table.
  • The statement will successfully create the table and the first primary key but not the second.
  • The statement will successfully create a single table and one composite primary key consisting of two columns.
  • The statement will successfully create the table and two primary keys.

Pregunta 15

Pregunta
The difference between dropping a column from a table with DROP and setting a column to be UNUSED is:
Respuesta
  • An UNUSED column can be recovered.
  • The UNUSED column and its data are retained within the table's storage allocation and counts against the total limit on the number of columns the table is allowed to have.
  • A column that is dropped with DROP no longer appears within the table's description as shown with the DESC or DESCRIBE statement, whereas a column that is set to UNUSED still appears in the table's structure as shown in the output of the DESC statement.
  • Nothing.

Pregunta 16

Pregunta
The purpose of the CREATE DIRECTORY statement is to create a named object in the database:
Respuesta
  • That lists names of user accounts that have external privileges
  • That contains lookup reference material for queries
  • That identifies the root directory of the Oracle server installation
  • That points to a directory you choose somewhere within the Oracle server's file system
Mostrar resumen completo Ocultar resumen completo

Similar

Structured Query Language (SQL) (Section 1)
Craig Willey
Manipulating Data (Section 3)
Craig Willey
Restricting and Sorting Data (Section 4)
Craig Willey
Materias de Modalidad de 2º de Bachillerato
maya velasquez
ANATOMÍA Y FISIOLOGÍA DE PLACENTA
cinthia_ps25
Qué Carrera Estudiar
Diego Santos
La acentuación de diptongos, triptongos e hiatos
Elisa Tormo Guevara
Italiano-B1.1-verbi
Diego Borghetto
Partes de la célula animal y vegetal
Cami Puaque
AUTORES-LIBROS
ROSA MARIA ARRIAGA
MAPA CONCEPTUAL CAP 1 GERENCIA ESTRATEGICA
DAVID ARCE