Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Beginner create table question

Re: Beginner create table question

From: Randy DeWoolfson <randyd_at_cais.com>
Date: 1997/11/28
Message-ID: <347EFC40.6E26@cais.com>#1/1

Not to be a pain in the a**.. but,

whats the primary key in this table? is it a summary table? should it be a view instead?

as an aside: for dates, i like the convention of naming the type of date, then appending _dt. for example, these common date fields:

date of birth : birth_dt
date of creation : creation_dt
date of deletion : deletion_dt

etc.

if the date foeld stores values more significant than days, i.e. hours min seconds, etc. then i like the addition of _tm instead of _dt.

also, IMHO, you should avoid incomplete or misspelled column names such as Disti in the sample. go ahead and type it out. if you are consistent with typing out every column name, then you wont have to refer to a DED or other document constantly to try to remember how you spelled or abbreviated something.

my 2 cents.
randy

Steve Mustanski wrote:
>
> drichardson wrote:
> >
> > Hello,
> >
> > I am new to Oracle and I need to create a simple table, but when I attempt
> > to create the table I get an invalid object (I think its object) error in
> > line 3:
> >
> > create table SALESOUT (
> > 2 Disti CHAR(50),
> > 3 Date DATE,
> > 4 Period NUMBER,
> > 5 Sales Out NUMBER(9,2),
> > 6 Bookings NUMBER(9,2),
> > );
> >
> > Can someone look at my code and tell me if it is incorrect, I would really
> > appreciate it.
> >
> > Thanks in advance,
> >
> > Dave
>
> Hi, I am kind of new too, but I think I got it.
> I believe that "date" is a reserved word, so try
> "date_created" instead. Also, you will need to change
> line 5 to "sales_out". "sales 'space' out" will cause
> and error too. Also you don't need the ',' at the end
> of line 6 (also causes and error).
>
> Hope this helps.
 

-- 
--------------------------------------------------------------------
randyd_at_cais.com         brandall_at_erols.com       randy_at_euclidsys.com
--------------------------------------------------------------------
                     remove .nospam to reply

Pursuant to US Code Title 47, Section 227, unsolicited commercial
E-mail sent to these addresses is subject to a $500 archival fee per
copy. E-mail recieved after any reciept of this notice implies
acceptance of these terms. A copy of USC Title 47, Section 227
may be found online at http://www.law.cornell.edu/uscode/47/227.html
====================================================================
Received on Fri Nov 28 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US