347
edits
Changes
no edit summary
<p>
The following will create a temporary table that will order [var1], hold [var2] and also create a column with an a counter variable named "id".
<br /><br />
A: CREATE TEMPORARY TABLE `rank` (id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY) SELECT [var1],[var2] FROM `test` WHERE [var3] = "string" AND [var1] <10000000 ORDER BY [var1];