Regarding query

Results 1 to 3 of 3

Thread: Regarding query

  1. #1
    Join Date
    Dec 1969

    Default Regarding query

    While inseting records into the database we use a sql query as<BR>"select * from table where 1 &#060;&#062; 1" why is it so?<BR>can we use the query as<BR>"select * from table where id=something" ?<BR><BR>

  2. #2
    Chrace Guest

    Default RE: Regarding query

    First, INSERTing with SELECT does not sound effective.<BR>Second, "where 1 &#060;&#062; 1" is logically never true? Perhaps some SQL dude can correct me.<BR>Third, "select * from table where id=something" is what a big part of my day is used at doing. Lot more normal than the "1 &#060;&#062; 1" version.<BR><BR>Dunno if I actually answered anything here, but I&#039m sure a few tests would give a lot better answers than I can on this one.<BR><BR>/Chrace

  3. #3
    David Geran Guest

    Default RE: Regarding query

    Another common WHERE clause is WHERE (0=1). These clauses are simply a shortcut to returning an empty recordset from your query.<BR><BR>Usually in preperation to add new records...<BR><BR>Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts