Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Please can anyone help me with SQL in Oracle.
With PL/SQl you could try ...
declare
test_date date;
begin
select birthdate into test_date from _table_; --addthe name of the table here
_do_something_;
else
_do_something_else_;
Good Luck
Ray <raytao_at_home.com> wrote in message news:38967653.11734066_at_news...
> In the table I have created using Oracle 8 and SQL statements, I need
> to be able to check if a field called 'BIRTHDATE' of type 'DATE' is
> no more than 15 years from today. How can I code for this because I
> cannot use the SYSDATE system variable with the CREATE TABLE
> statement? I need to somehow check if this constraint is true.
> Should it be coded on the column level or table level? Does anyone
> know how I can do this? Any help would be great!!! Please email me
> at raytao_at_home.com if you have a solution. Thank you.
Received on Mon Jan 31 2000 - 00:00:00 CST