"Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
> David Champagne
> <david_e_champagne-/[EMAIL PROTECTED]> wrote:
> > If I have a table defined in the following manner
> >
> >    CREATE TABLE License (Form varchar(256), Type int, NbOcc int)
> >
> > and then I execute a query
> >
> >    SELECT * FROM License WHERE FORM = "form";
> >
> > I get all rows returned
> 
> "form" in double quotes is an alternative way to refer to FORM column - 
> it is _not_ a string literal. So your query condition is WHERE 
> FORM=FORM, which is of course always true (except maybe when FORM is 
> NULL).
> 
> A string literal should be enclosed in single quotes, as in 'form'.
> 

Furthermore, the column name "form" is easily confused with the
SQL keyword "from".  You might want to consider selecting a more
distinctive name for that column.  
--
D. Richard Hipp   <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to