Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
chapter varchar varchar varchar varchar you now de

Chapter varchar varchar varchar varchar you now desc customer

162

Chapter 8

address2
state
zip
country

);

If you now do a desc customer, you’ll see that your table is in place. There are, however, a few problems that you will run into immediately. First, the custid will be used to identify your customers uniquely. You don’t want someone using the same cus-tomer identification (id) twice. There is an easy way to prevent this from happening—just issue the following command:

TIP

CREATE TABLE customer (
custid NUMBER(4) PRIMARY KEY,
fname VARCHAR2(30),
lname VARCHAR2(30),
email VARCHAR2(30),
address1 VARCHAR2(50),
address2 VARCHAR2(50),
state VARCHAR(5),
zip VARCHAR(10),
country VARCHAR(5) DEFAULT ‘USA’
);

Oracle SQL 163

Now, one thing you do want your user to define is his or her last name. If you don’t define the last name, the row will be completely useless. You can require that the last name be defined as follows:

NOTE There are many other storage options for your table that allow you to fine-tune how your data is stored. They require a deep understanding of the Oracle architecture to be used properly. These options are beyond the scope of this text and aren’t covered here.

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Michelle Braun

PageId: ELIA519956