by
455 17
0
5
2,086
0
Top 1% !
Famous
Tagged
Specified
OpenSource
Popularity: 10445th place
Languagemysql

SQL Join with Static Columns

Identifies the origin of each row after the join of two tables.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1523323/SQL-Join-with-Static-Columns?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
DROP TABLE IF EXISTS signed_A; DROP TABLE IF EXISTS signed_B; CREATE TEMPORARY TABLE signed_A AS (SELECT 'TableA' AS STATUS, A.col1, A.col2 FROM A); CREATE TEMPORARY TABLE signed_B AS (SELECT 'TableB' AS STATUS, hostings.col3 FROM B); SELECT * FROM A LEFT JOIN B ON A.col2=B.col3;
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus