I'd like to add a value to the values provided by a SELECT INTO statement.
Given the table named foo:
+----+
| id |
+----+
| 1 |
| 2 |
| 3 |
+----+
I would like to populate the table bar with:
+----+------+
| id | type |
+----+------+
| 1 | R |
| 2 | R |
| 3 | R |
+----+------+
I'd imagine this looking something like this:
SELECT foo.id, type INTO bar FROM foo LEFT JOIN 'R' AS type;
... unfortunately this doesn't work. Can anyone tell me how to do this please
I'm using both mysql and mssql