Oracle Problem 1: Please Help
Date: Tue, 6 Apr 2004 01:09:33 -0500
Message-ID: <singhjih.14a3a5_at_mail.webservertalk.com>
Hi Everyone,
This is my problem;
*PROBLEM 1:* I need to create a table called *INSTRUCTOR_NEW* with all
of the information from *INSTRUCTOR* table. Add a column to the
instructor table called *SALARY* which should be a number with 2
decimal places. Add a constraint to the *INSTRUCTOR_NEW* table called
*inst_max_sal* that stipulates that no instructor can have a salary
greater than $3000(three thousand dollars) (this is a weekly salary).
Code:
CREATE TABLE instructor_new AS
SELECT *
FROM instructor;
ALTER TABLE instructor_new
ADD (salary NUMBER(4,2)
CONSTRAINT inst_max_sal
CHECK (salary >= 0
AND salary < 3000));
/
I used the code above however the problem I'm having is identifying the
salary as a weekly salary. *How do I write that the MAX salary is
$3000.00 per week in SQL?
*
-- singhjih ------------------------------------------------------------------------ Posted via http://www.webservertalk.com ------------------------------------------------------------------------ View this thread: http://www.webservertalk.com/message173341.htmlReceived on Tue Apr 06 2004 - 08:09:33 CEST