Re: SELECT 'X'
Date: 14 Aug 2002 02:13:30 -0700
Message-ID: <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'.
DELETE FROM EMP 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
> Hello,
This Statement will never work.
What do you want to do?
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.
Mike
> 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 - 11:13:30 CEST