What do these statements do within the same expression? First stumbled upon a similar syntax. Like:

INSERT INTO tblTemp2 (fldID) SELECT tblTemp1.fldOrder_ID FROM tblTemp1 WHERE tblTemp1.fldOrder_ID > 100; 

Inserts records by condition, selecting them?

And is this syntax right now? I found it in one of the manuals, but I read that it does not work for MySQL. Is it true?

 SELECT val1+val2 INTO 't' FROM `my` LIMIT 0,1; 

    1 answer 1

    First, a SELECT ... WHERE ... query is executed, and its result tblTemp1.fldOrder_ID added to the tblTemp2 table in the fldID field

    The second option that you specified will not work, because the structure of the SQL syntax is broken

    • 3
      In the second phrase, it would be better to say "MySQL does not support select into syntax" or something like that. Because in other databases, this syntax is working w3schools.com/sql/sql_select_into.asp - Mike