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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie help

Re: Newbie help

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 31 Jan 1999 01:11:57 GMT
Message-ID: <36bea15c.3171734@netnews.worldnet.att.net>


See my comments below.

regards,

Jonathan



Jonathan Gennick -- Oracle DBA, Author, Editor jonathan_at_gennick.com
http://gennick.com
Brighten the corner where you are.

On Fri, 29 Jan 1999 01:01:01 -0500, Douglas J Hagen <djhagen_at_acsu.buffalo.edu> wrote:

>Hello...I have to use sqlplus to do a little project, and I have never
>used it before. I'm using it in a strictly text based unix format.
>Here is what I need to know how to do (I have everything done before the
>line...preceeding the line is just so you know what's going on):
>
>1. Start a session with SQL*PLUS.g.
>2. Start a log of your session.
>3. Create a new table called "Student" with the fields:
>
> SSN type number, length 9 -- Social Security Number
>
> LNAME type character, length 20 -- Last Name
>
> FNAME type character,slength 10 -- First Name
>
> DEPARTMENT type character, length 3 -- Department of Major
>
> GPA type number, length 1 + 2 decimal -- Grade Point Average
>
>4. Populate the Student talems oe with 5 records.
>--------------------------------------------------------------------------------
>
>5. Set the headings for columns LNAME and FNAME to 'Last Name' and
> 'First Name' respectively.

COLUMN lname HEADING 'Last Name'
COLUMN fname HEADING 'First Name'

>6. Set column SSN to display exactly 9 digits, including any leading
>zeros.

COLUMN ssn HEADING 'SS #' FORMAT 099999999

>7. Query the database for a list of all items in the Student table.

SELECT * FROM student;

>8. Enter a comment line.

/* This is a comment

     that spans two lines */

--this is a single-line comment

>9. Query the database for all studeo "unts with GPA less than 2.0
I'll let you figure this one out. Sounds like this might be a homework problem. My earlier SELECT should be enough to get you started.

> 10. Compute the average GPA.

ditto. Received on Sat Jan 30 1999 - 19:11:57 CST

Original text of this message

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