Re: SELECT 'X'
Date: 14 Aug 2002 06:57:01 -0700
Message-ID: <156709aa.0208140557.2815ff3c_at_posting.google.com>
tks
tenmuc_at_onlinehome.de (Michael) wrote in message news:<e5a603fb.0208140113.421429ed_at_posting.google.com>...
> Hi Steve,
>
> SELECT 'X' FROM emp WHERE empno = 1 does result in ONE record
> containing 'X' if there is a record in the table emp where empno=1
> else the result is empty (NULL). SELECT 'X' means the result is ALWAYS
> 'X'.
> This Statement will never work.
> What do you want to do?
>
> DELETE FROM EMP WHERE EMPNO=1;
> It says: All records in the table EMP are deleted in which the clause
> after "WHERE" is true, in the example all records where empno=1.
>
> After "WHERE" is an expression expected, and only those records in the
> table are deleted, where the clause results in a TRUE.
>
>
> Regards
> Mike
>
> > Hello,
> > Having developer trying to run something like this
> >
> > DELETE FROM EMP
> > WHERE (SELECT 'X' FROM emp WHERE empno = 1);
> >
> > the statement fails with missing expression
> >
> > I'm unclear on the usage of SELECT 'X'
> > an also why does the statement fail?
> >
> > tks
> >
> > steve
Received on Wed Aug 14 2002 - 15:57:01 CEST