Which is a valid CREATE TABLE statement?

Which is a valid CREATE TABLE statement?

Which is a valid CREATE TABLE statement?

A.
CREATE TABLE EMP9$# AS (empid number(2));

B.
CREATE TABLE EMP*123 AS (empid number(2));

C.
CREATE TABLE PACKAGE AS (packid number(2));

D.
CREATE TABLE 1EMP_TEST AS (empid number(2));

Explanation:
Table names and column names must begin with a letter and be 1-30 characters long. Characters
A-Z, a-z, 0-9, _, $ and # (legal characters but their use is discouraged).
Incorrect answer:
B:
Non alphanumeric character such as “*” is discourage in Oracle table name.
D:
Table name must begin with a letter.
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 9-4



Leave a Reply 1

Your email address will not be published. Required fields are marked *


The Tuk

The Tuk

Which is the valid CREATE TABLE statement?
A. CREATE TABLE emp9$# (emp_no NUMBER (4));
B. CREATE TABLE 9emp$# (emp_no NUMBER(4));
C. CREATE TABLE emp*123 (emp_no NUMBER(4));
D. CREATE TABLE emp9$# (emp_no NUMBER(4), date DATE);