insert ?????

Results 1 to 3 of 3

Thread: insert ?????

  1. #1
    Join Date
    Dec 1969

    Default insert ?????

    Kinda new to db work. How common, or is it possible, is it to have a insert into .... and then have a Where .... statement in the same sql?<BR><BR>Thanks!

  2. #2
    Lurker Guest

    Default RE: insert ?????

    It doesn&#039;t make sense to have a where caluse in an insert statement. Either you want to insert it or you don&#039;t. If you don&#039;t, then don&#039;t issue the statement.

  3. #3
    Join Date
    Dec 1969

    Default RE: insert ?????

    Not really in an INSERT statement, but in a SELECT statement that&#039;s part of a INSERT, yes.<BR><BR>INSERT INTO Table1 (F1, F2, f3)<BR>SELECT F1, F2, F3 FROM Table2 WHERE F4 = &#039;xyz&#039;<BR><BR>That will insert all records from table2 into table1 where field &#039;f4&#039; is equal to &#039;xyz&#039;<BR><BR>

Posting Permissions

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