Is there a way to skip the record at the top of the result set in MySQL? For example, if my results are:
1 | a 2 | b 3 | c etc
I want to receive:
Select | Select 1 | a 2 | b 3 | c etc
Where "Select" is not really part of the recordset, but artificially inserted.
Thanks.
The only way to achieve this with a query is to use UNION:
UNION
SELECT 'Select', 'Select' UNION SELECT ...
The correct ordering will depend on how you want the results to be ordered in general.
, ( ) , .
SELECT "Select" as col1, "Select" as col2 UNION SELECT col1, col2 FROM table
If your request
SELECT Colum1, Column2 FROM Table
to try
SELECT Column1, Column2 from the UNION SELECT table "Select", "Select"
Union.
select "Select", "Select" union select Col1, Col2 from Table1
Source: https://habr.com/ru/post/1716849/More articles:Parsing URLs for query values using Selenium IDE - seleniumTransfer data transmitted xargs twice in one line - mysqlHow to determine which version of SQL (for example, SQL 2008 or SQL Azure) - sql-server-2008How effective is SBCL for storing large graphs? - cWhat are the topics for the classroom? - .netjQuery returns true for checking "is: empty" on the added html - jqueryReplacing the Start menu - windowsWeb/Screen Scraping с Google App Engine - код работает в интерпретаторе python, но не в GAE - pythonRails does not load application.html.erb, instead loads view pieces - ruby-on-railscount () causing an "unexpected T_STRING" error? - phpAll Articles