<p>I have a MySQL table with coordinates, the column names are X and Y. Now I want to swap the column values in this table, so that X becomes Y and Y becomes X. The most apparent solution would be renaming the columns, but I don't want to make structure changes since I don't necessarily have permissions to do that.</p>

<p>Is this possible to do with <b>UPDATE</b> in some way? <b>UPDATE table SET X=Y, Y=X</b> obviously won't do what I want.</p>

<hr>

<p>Edit: Please note that my restriction on permissions, mentioned above, effectively prevents the use of ALTER TABLE or other commands that change the table/database structure. Renaming columns or adding new ones are unfortunately not options.</p>

[{'answer_id': 37653, 'author': 'Unsliced', 'author_id': 2902, 'author_profile': 'https://Stackoverflow.com/users/2902', 'pm_score': 2, 'selected': False, 'text': '<p>Two alternatives \n 1. Use a temporary table \n 2. Investigate\n    the <a href="http://en.wikipedia.org/wiki/XOR_swap_algorithm" rel="nofollow noreferrer">XOR algorithm</a></p>\n'}, {'answer_id': 37657, 'author': 'fijter', 'author_id': 3215, 'author_profile': 'https://Stackoverflow.com/users/3215', 'pm_score': 2, 'selected': False, 'text': "<p><code><pre>\nALTER TABLE table ADD COLUMN tmp;\nUPDATE table SET tmp = X;\nUPDATE table SET X = Y;\nUPDATE table SET Y = tmp;\nALTER TABLE table DROP COLUMN tmp;\n</code></pre>\nSomething like this?</p>\n\n<p>Edit: About Greg's comment:\nNo, this doesn't work:</p>\n\n<p><code><pre>\nmysql> select * from test;\n+------+------+\n| x    | y    |\n+------+------+\n|    1 |    2 |\n|    3 |    4 |\n+------+------+\n2 rows in set (0.00 sec)</p>\n\n<p>mysql> update test set x=y, y=x;\nQuery OK, 2 rows affected (0.00 sec)\nRows matched: 2  Changed: 2  Warnings: 0</p>\n\n<p>mysql> select * from test;\n+------+------+\n| x    | y    |\n+------+------+\n|    2 |    2 |\n|    4 |    4 |\n+------+------+\n2 rows in set (0.00 sec)\n</code></pre></p>\n"}, {'answer_id': 37660, 'author': 'Greg Hewgill', 'author_id': 893, 'author_profile': 'https://Stackoverflow.com/users/893', 'pm_score': 4, 'selected': False, 'text': '<p><strong>UPDATE table SET X=Y, Y=X</strong> will do precisely what you want (edit: in PostgreSQL, not MySQL, see below). The values are taken from the old row and assigned to a new copy of the same row, then the old row is replaced. You do not have to resort to using a temporary table, a temporary column, or other swap tricks.</p>\n\n<p>@D4V360: I see. That is shocking and unexpected. I use PostgreSQL and my answer works correctly there (I tried it). See the <a href="http://www.postgresql.org/docs/8.3/static/sql-update.html" rel="noreferrer">PostgreSQL UPDATE docs</a> (under Parameters, expression), where it mentions that expressions on the right hand side of SET clauses explicitly use the old values of columns. I see that the corresponding <a href="http://dev.mysql.com/doc/refman/6.0/en/update.html" rel="noreferrer">MySQL UPDATE docs</a> contain the statement "Single-table UPDATE assignments are generally evaluated from left to right" which implies the behaviour you describe.</p>\n\n<p>Good to know.</p>\n'}, {'answer_id': 37737, 'author': 'mercutio', 'author_id': 1951, 'author_profile': 'https://Stackoverflow.com/users/1951', 'pm_score': 3, 'selected': False, 'text': '<p>Ok, so just for fun, you could do this! (assuming you\'re swapping string values)</p>\n\n<pre><code>mysql&gt; select * from swapper;\n+------+------+\n| foo  | bar  |\n+------+------+\n| 6    | 1    | \n| 5    | 2    | \n| 4    | 3    | \n+------+------+\n3 rows in set (0.00 sec)\n\nmysql&gt; update swapper set \n    -&gt; foo = concat(foo, "###", bar),\n    -&gt; bar = replace(foo, concat("###", bar), ""),\n    -&gt; foo = replace(foo, concat(bar, "###"), "");\n\nQuery OK, 3 rows affected (0.00 sec)\nRows matched: 3  Changed: 3  Warnings: 0\n\nmysql&gt; select * from swapper;\n+------+------+\n| foo  | bar  |\n+------+------+\n| 1    | 6    | \n| 2    | 5    | \n| 3    | 4    | \n+------+------+\n3 rows in set (0.00 sec)\n</code></pre>\n\n<p>A nice bit of fun abusing the left-to-right evaluation process in MySQL.</p>\n\n<p>Alternatively, just use XOR if they\'re numbers. You mentioned coordinates, so do you have lovely integer values, or complex strings?</p>\n\n<p>Edit: The XOR stuff works like this by the way:</p>\n\n<pre><code>update swapper set foo = foo ^ bar, bar = foo ^ bar, foo = foo ^ bar;\n</code></pre>\n'}, {'answer_id': 385713, 'author': 'Artelius', 'author_id': 31945, 'author_profile': 'https://Stackoverflow.com/users/31945', 'pm_score': 1, 'selected': False, 'text': "<p>Assuming you have signed integers in your columns, you may need to use CAST(a ^ b AS SIGNED), since the result of the ^ operator is an unsigned 64-bit integer in MySQL.</p>\n\n<p>In case it helps anyone, here's the method I used to swap the same column between two given rows:</p>\n\n<pre><code>SELECT BIT_XOR(foo) FROM table WHERE key = $1 OR key = $2\n\nUPDATE table SET foo = CAST(foo ^ $3 AS SIGNED) WHERE key = $1 OR key = $2\n</code></pre>\n\n<p>where $1 and $2 are the keys of two rows and $3 is the result of the first query.</p>\n"}, {'answer_id': 385733, 'author': 'MarkR', 'author_id': 13724, 'author_profile': 'https://Stackoverflow.com/users/13724', 'pm_score': 2, 'selected': False, 'text': "<p>I've not tried it but</p>\n\n<pre><code>UPDATE tbl SET @temp=X, X=Y, Y=@temp\n</code></pre>\n\n<p>Might do it.</p>\n\n<p>Mark</p>\n"}, {'answer_id': 395008, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': "<p>This surely works! I've just needed it to swap Euro and SKK price columns. :)</p>\n\n<pre><code>UPDATE tbl SET X=Y, Y=@temp where @temp:=X;\n</code></pre>\n\n<p>The above will not work (ERROR 1064 (42000): You have an error in your SQL syntax)</p>\n"}, {'answer_id': 559291, 'author': 'Artem Russakovskii', 'author_id': 47680, 'author_profile': 'https://Stackoverflow.com/users/47680', 'pm_score': 9, 'selected': True, 'text': '<p>I just had to deal with the same and I\'ll summarize my findings.</p>\n\n<ol>\n<li><p>The <code>UPDATE table SET X=Y, Y=X</code> approach obviously doesn\'t work, as it\'ll just set both values to Y.</p></li>\n<li><p>Here\'s a method that uses a temporary variable. Thanks to Antony from the comments of <a href="http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/" rel="noreferrer">http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/</a> for the "IS NOT NULL" tweak. Without it, the query works unpredictably. See the table schema at the end of the post. This method doesn\'t swap the values if one of them is NULL. Use method #3 that doesn\'t have this limitation.</p>\n\n<p><code>UPDATE swap_test SET x=y, y=@temp WHERE (@temp:=x) IS NOT NULL;</code></p></li>\n<li><p>This method was offered by Dipin in, yet again, the comments of <a href="http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/" rel="noreferrer">http://beerpla.net/2009/02/17/swapping-column-values-in-mysql/</a>. I think it’s the most elegant and clean solution. It works with both NULL and non-NULL values.</p>\n\n<p><code>UPDATE swap_test SET x=(@temp:=x), x = y, y = @temp;</code></p></li>\n<li><p>Another approach I came up with that seems to work:</p>\n\n<p><code>UPDATE swap_test s1, swap_test s2 SET s1.x=s1.y, s1.y=s2.x WHERE s1.id=s2.id;</code></p></li>\n</ol>\n\n<p>Essentially, the 1st table is the one getting updated and the 2nd one is used to pull the old data from.<br/>\nNote that this approach requires a primary key to be present.</p>\n\n<p>This is my test schema:</p>\n\n<pre><code>CREATE TABLE `swap_test` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `x` varchar(255) DEFAULT NULL,\n  `y` varchar(255) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n) ENGINE=InnoDB;\n\nINSERT INTO `swap_test` VALUES (\'1\', \'a\', \'10\');\nINSERT INTO `swap_test` VALUES (\'2\', NULL, \'20\');\nINSERT INTO `swap_test` VALUES (\'3\', \'c\', NULL);\n</code></pre>\n'}, {'answer_id': 562230, 'author': 'Dipin', 'author_id': 67976, 'author_profile': 'https://Stackoverflow.com/users/67976', 'pm_score': 6, 'selected': False, 'text': '<p>The following code works for all scenarios in my quick testing:</p>\n\n<pre><code>UPDATE swap_test\n   SET x=(@temp:=x), x = y, y = @temp\n</code></pre>\n'}, {'answer_id': 1344196, 'author': 'SeanDowney', 'author_id': 5261, 'author_profile': 'https://Stackoverflow.com/users/5261', 'pm_score': 1, 'selected': False, 'text': '<p>You <em>could</em> change column names, but this is more of a hack. But be cautious of any indexes that may be on these columns </p>\n'}, {'answer_id': 11749453, 'author': 'RolandoMySQLDBA', 'author_id': 491757, 'author_profile': 'https://Stackoverflow.com/users/491757', 'pm_score': 6, 'selected': False, 'text': '<p>You could take the sum and subtract the opposing value using X and Y</p>\n\n<pre><code>UPDATE swaptest SET X=X+Y,Y=X-Y,X=X-Y;\n</code></pre>\n\n<p>Here is a sample test (and it works with negative numbers)</p>\n\n<pre><code>mysql&gt; use test\nDatabase changed\nmysql&gt; drop table if exists swaptest;\nQuery OK, 0 rows affected (0.03 sec)\n\nmysql&gt; create table swaptest (X int,Y int);\nQuery OK, 0 rows affected (0.12 sec)\n\nmysql&gt; INSERT INTO swaptest VALUES (1,2),(3,4),(-5,-8),(-13,27);\nQuery OK, 4 rows affected (0.08 sec)\nRecords: 4  Duplicates: 0  Warnings: 0\n\nmysql&gt; SELECT * FROM swaptest;\n+------+------+\n| X    | Y    |\n+------+------+\n|    1 |    2 |\n|    3 |    4 |\n|   -5 |   -8 |\n|  -13 |   27 |\n+------+------+\n4 rows in set (0.00 sec)\n\nmysql&gt;\n</code></pre>\n\n<p>Here is the swap being performed</p>\n\n<pre><code>mysql&gt; UPDATE swaptest SET X=X+Y,Y=X-Y,X=X-Y;\nQuery OK, 4 rows affected (0.07 sec)\nRows matched: 4  Changed: 4  Warnings: 0\n\nmysql&gt; SELECT * FROM swaptest;\n+------+------+\n| X    | Y    |\n+------+------+\n|    2 |    1 |\n|    4 |    3 |\n|   -8 |   -5 |\n|   27 |  -13 |\n+------+------+\n4 rows in set (0.00 sec)\n\nmysql&gt;\n</code></pre>\n\n<p>Give it a Try !!!</p>\n'}, {'answer_id': 24143908, 'author': 'webizon', 'author_id': 3239133, 'author_profile': 'https://Stackoverflow.com/users/3239133', 'pm_score': 0, 'selected': False, 'text': '<p>Swapping of column values using single query</p>\n\n<p>UPDATE my_table SET a=@tmp:=a, a=b, b=@tmp;</p>\n\n<p>cheers...!</p>\n'}, {'answer_id': 25444064, 'author': 'http8086', 'author_id': 1356874, 'author_profile': 'https://Stackoverflow.com/users/1356874', 'pm_score': 3, 'selected': False, 'text': "<p>I believe have a intermediate exchange variable is the best practice in such way:</p>\n\n<pre><code>update z set c1 = @c := c1, c1 = c2, c2 = @c\n</code></pre>\n\n<p>First, it works always; second, it works regardless of data type.</p>\n\n<p>Despite of Both</p>\n\n<pre><code>update z set c1 = c1 ^ c2, c2 = c1 ^ c2, c1 = c1 ^ c2\n</code></pre>\n\n<p>and</p>\n\n<pre><code>update z set c1 = c1 + c2, c2 = c1 - c2, c1 = c1 - c2\n</code></pre>\n\n<p>are working usually, only for number data type by the way, and it is your responsibility to prevent overflow, you can not use XOR between signed and unsigned, you also can not use sum for overflowing possibility.</p>\n\n<p>And</p>\n\n<pre><code>update z set c1 = c2, c2 = @c where @c := c1\n</code></pre>\n\n<p>is not working\nif c1 is 0 or NULL or zero length string or just spaces.</p>\n\n<p>We need change it to</p>\n\n<pre><code>update z set c1 = c2, c2 = @c where if((@c := c1), true, true)\n</code></pre>\n\n<p>Here is the scripts:</p>\n\n<pre><code>mysql&gt; create table z (c1 int, c2 int)\n    -&gt; ;\nQuery OK, 0 rows affected (0.02 sec)\n\nmysql&gt; insert into z values(0, 1), (-1, 1), (pow(2, 31) - 1, pow(2, 31) - 2)\n    -&gt; ;\nQuery OK, 3 rows affected (0.00 sec)\nRecords: 3  Duplicates: 0  Warnings: 0\n\nmysql&gt; select * from z;\n+------------+------------+\n| c1         | c2         |\n+------------+------------+\n|          0 |          1 |\n|         -1 |          1 |\n| 2147483647 | 2147483646 |\n+------------+------------+\n3 rows in set (0.02 sec)\n\nmysql&gt; update z set c1 = c1 ^ c2, c2 = c1 ^ c2, c1 = c1 ^ c2;\nERROR 1264 (22003): Out of range value for column 'c1' at row 2\nmysql&gt; update z set c1 = c1 + c2, c2 = c1 - c2, c1 = c1 - c2;\nERROR 1264 (22003): Out of range value for column 'c1' at row 3\n\nmysql&gt; select * from z;\n+------------+------------+\n| c1         | c2         |\n+------------+------------+\n|          0 |          1 |\n|          1 |         -1 |\n| 2147483646 | 2147483647 |\n+------------+------------+\n3 rows in set (0.02 sec)\n\nmysql&gt; update z set c1 = c2, c2 = @c where @c := c1;\nQuery OK, 2 rows affected (0.00 sec)\nRows matched: 2  Changed: 2  Warnings: 0\n\nmysql&gt; select * from z;\n+------------+------------+\n| c1         | c2         |\n+------------+------------+\n|          0 |          1 |\n|         -1 |          1 |\n| 2147483647 | 2147483646 |\n+------------+------------+\n3 rows in set (0.00 sec)\n\nmysql&gt; select * from z;\n+------------+------------+\n| c1         | c2         |\n+------------+------------+\n|          1 |          0 |\n|          1 |         -1 |\n| 2147483646 | 2147483647 |\n+------------+------------+\n3 rows in set (0.00 sec)\n\nmysql&gt; update z set c1 = @c := c1, c1 = c2, c2 = @c;\nQuery OK, 3 rows affected (0.02 sec)\nRows matched: 3  Changed: 3  Warnings: 0\n\nmysql&gt; select * from z;\n+------------+------------+\n| c1         | c2         |\n+------------+------------+\n|          0 |          1 |\n|         -1 |          1 |\n| 2147483647 | 2147483646 |\n+------------+------------+\n3 rows in set (0.00 sec)\n\nmysql&gt;update z set c1 = c2, c2 = @c where if((@c := c1), true, true);\nQuery OK, 3 rows affected (0.02 sec)\nRows matched: 3  Changed: 3  Warnings: 0\n\nmysql&gt; select * from z;\n+------------+------------+\n| c1         | c2         |\n+------------+------------+\n|          1 |          0 |\n|          1 |         -1 |\n| 2147483646 | 2147483647 |\n+------------+------------+\n3 rows in set (0.00 sec)\n</code></pre>\n"}, {'answer_id': 28415690, 'author': 'Ashutosh SIngh', 'author_id': 3725409, 'author_profile': 'https://Stackoverflow.com/users/3725409', 'pm_score': 0, 'selected': False, 'text': "<pre><code>CREATE TABLE Names\n(\nF_NAME VARCHAR(22),\nL_NAME VARCHAR(22)\n);\n\nINSERT INTO Names VALUES('Ashutosh', 'Singh'),('Anshuman','Singh'),('Manu', 'Singh');\n\nUPDATE Names N1 , Names N2 SET N1.F_NAME = N2.L_NAME , N1.L_NAME = N2.F_NAME \nWHERE N1.F_NAME = N2.F_NAME;\n\nSELECT * FROM Names;\n</code></pre>\n"}, {'answer_id': 38007428, 'author': 'Archer1974', 'author_id': 6507575, 'author_profile': 'https://Stackoverflow.com/users/6507575', 'pm_score': 0, 'selected': False, 'text': '<p>I had to just move value from one column to the other (like archiving) and reset the value of the original column.<br>\nThe below (reference of #3 from accepted answer above) worked for me.</p>\n\n<pre><code>Update MyTable set X= (@temp:= X), X = 0, Y = @temp WHERE ID= 999;\n</code></pre>\n'}, {'answer_id': 52201000, 'author': 'Andrew Foster', 'author_id': 2227342, 'author_profile': 'https://Stackoverflow.com/users/2227342', 'pm_score': 0, 'selected': False, 'text': "<p>This example swaps <strong>start_date</strong> and <strong>end_date</strong> for records where the dates are the wrong way round (when performing ETL into a major rewrite, I found some <strong>start</strong> dates later than their <strong>end</strong> dates.  Down, bad programmers!).</p>\n\n<p>In situ, I'm using MEDIUMINTs for performance reasons (like Julian days, but having a 0 root of 1900-01-01), so I was OK doing a condition of <strong>WHERE mdu.start_date > mdu.end_date</strong>.</p>\n\n<p>The PKs were on all 3 columns individually (for operational / indexing reasons).</p>\n\n<pre><code>UPDATE monitor_date mdu\nINNER JOIN monitor_date mdc\n    ON mdu.register_id = mdc.register_id\n    AND mdu.start_date = mdc.start_date\n    AND mdu.end_date = mdc.end_date\nSET mdu.start_date = mdu.end_date, mdu.end_date = mdc.start_date\nWHERE mdu.start_date &gt; mdu.end_date;\n</code></pre>\n"}, {'answer_id': 54015649, 'author': 'Raman Singh', 'author_id': 5525924, 'author_profile': 'https://Stackoverflow.com/users/5525924', 'pm_score': 1, 'selected': False, 'text': '<p><strong>Table name is customer.</strong> \n<strong>fields are a and b, swap a value to b;.</strong></p>\n\n<p><strong>UPDATE customer  SET a=(@temp:=a), a = b, b = @temp</strong></p>\n\n<p>I checked this is working fine.</p>\n'}, {'answer_id': 57119800, 'author': 'SamK', 'author_id': 11810251, 'author_profile': 'https://Stackoverflow.com/users/11810251', 'pm_score': 2, 'selected': False, 'text': '<p>In SQL Server, you can use this query:</p>\n\n<pre class="lang-sql prettyprint-override"><code>update swaptable \nset col1 = t2.col2,\ncol2 = t2.col1\nfrom swaptable t2\nwhere id = t2.id\n</code></pre>\n'}, {'answer_id': 57193703, 'author': 'Felix Labayen', 'author_id': 2503754, 'author_profile': 'https://Stackoverflow.com/users/2503754', 'pm_score': 0, 'selected': False, 'text': '<p>Let\'s say you want to swap the value of first and last name in tb_user.</p>\n\n<p>The safest would be:</p>\n\n<ol>\n<li>Copy tb_user. So you will have 2 tables: tb_user and tb_user_copy</li>\n<li>Use UPDATE INNER JOIN query</li>\n</ol>\n\n<pre class="lang-sql prettyprint-override"><code>UPDATE tb_user a\nINNER JOIN tb_user_copy b\nON a.id = b.id\nSET a.first_name = b.last_name, a.last_name = b.first_name\n</code></pre>\n'}, {'answer_id': 62861002, 'author': 'Tanumay Saha', 'author_id': 12347807, 'author_profile': 'https://Stackoverflow.com/users/12347807', 'pm_score': 1, 'selected': False, 'text': '<p>You can apply below query, It worked perfect for me.</p>\n<pre><code>Table name: studentname\nonly single column available: name\n\n\nupdate studentnames \nset names = case names \nwhen &quot;Tanu&quot; then &quot;dipan&quot;\nwhen &quot;dipan&quot; then &quot;Tanu&quot;\nend;\n\nor\n\nupdate studentnames \nset names = case names \nwhen &quot;Tanu&quot; then &quot;dipan&quot;\nelse &quot;Tanu&quot;\nend;\n</code></pre>\n'}, {'answer_id': 63548307, 'author': 'Naveen Kashyap', 'author_id': 12311615, 'author_profile': 'https://Stackoverflow.com/users/12311615', 'pm_score': 0, 'selected': False, 'text': "<p>if you want to swap all the columns where x is to y and y to x; use this query.</p>\n<p><code>UPDATE table_name SET column_name = CASE column_name WHERE 'value of col is x' THEN 'swap it to y' ELSE 'swap it to x' END;</code></p>\n"}, {'answer_id': 64128356, 'author': 'PKS', 'author_id': 14163532, 'author_profile': 'https://Stackoverflow.com/users/14163532', 'pm_score': 0, 'selected': False, 'text': '<p>Let\'s imagine this table and let\'s try to swap the m and f from the \'sex\' table:</p>\n<div class="s-table-container">\n<table class="s-table">\n<thead>\n<tr>\n<th>id</th>\n<th>name</th>\n<th>sex</th>\n<th>salary</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>A</td>\n<td>m</td>\n<td>2500</td>\n</tr>\n<tr>\n<td>2</td>\n<td>B</td>\n<td>f</td>\n<td>1500</td>\n</tr>\n<tr>\n<td>3</td>\n<td>C</td>\n<td>m</td>\n<td>5500</td>\n</tr>\n<tr>\n<td>4</td>\n<td>D</td>\n<td>f</td>\n<td>500</td>\n</tr>\n</tbody>\n</table>\n</div>\n<pre><code>UPDATE sex\nSET sex = CASE sex\nWHEN \'m\' THEN \'f\'\nELSE \'m\'\nEND;\n</code></pre>\n<p>So the updated table becomes:</p>\n<div class="s-table-container">\n<table class="s-table">\n<thead>\n<tr>\n<th>id</th>\n<th>name</th>\n<th>sex</th>\n<th>salary</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>1</td>\n<td>A</td>\n<td>f</td>\n<td>2500</td>\n</tr>\n<tr>\n<td>2</td>\n<td>B</td>\n<td>m</td>\n<td>1500</td>\n</tr>\n<tr>\n<td>3</td>\n<td>C</td>\n<td>f</td>\n<td>5500</td>\n</tr>\n<tr>\n<td>4</td>\n<td>D</td>\n<td>m</td>\n<td>500</td>\n</tr>\n</tbody>\n</table>\n</div>'}, {'answer_id': 71355271, 'author': 'pbarney', 'author_id': 62536, 'author_profile': 'https://Stackoverflow.com/users/62536', 'pm_score': 2, 'selected': False, 'text': "<p>As other answers point out, <strong>a simple swap won't work with MySQL</strong> because it caches the value of column 1 <em>immediately</em> before processing column 2, resulting in both columns being set to the value of column 2.</p>\n<p>Given that the order of operations is not guaranteed in MySQL, using a temporary variable is also not reliable.</p>\n<p>The only safe way to swap two columns without modifying the table structure is with an inner join, which requires a primary key (<code>id</code> in this case).</p>\n<pre><code>UPDATE mytable t1, mytable t2\nSET t1.column1 = t1.column2,\n    t1.column2 = t2.column1\nWHERE t1.id = t2.id;\n</code></pre>\n<p><strong>This will work without any issues.</strong></p>\n\n"}]
['https://Stackoverflow.com/questions/37649', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/890/']