How can I create a table with two rows and two columns without selecting from an existing table? What I'm looking for is a select statement that returns,
eg.
id | value --------- 1 | 103 2 | 556
Use UNION
UNION
SELECT 1 as id, 103 as value UNION SELECT 2 as id, 556 as value
You can use UNION ALL . Which is the best choice, then UNION
UNION ALL
SELECT 1 as id, 103 as value UNION ALL SELECT 2 as id, 556 as value
Sybase answer, try something like this in mysql
select "1" as id,"103" as value union select "2" ,"556"
id | value----------1 | 1032 | 556
id | value
----------
1 | 103
2 | 556
If you do not want to hardcode the data in the SELECT statement, you will need to select from the table.
Source: https://habr.com/ru/post/1442948/More articles:Request Neo4j Cypher RETURN different set of nodes - neo4jImplementing the DllRegisterServer Method - c ++Get Xpath dynamically with ElementTree getpath () - pythonPython XpathEvaluator without namespace - pythonCreating a Visual Studio Express 11 project from the command line - c ++Normalize array methods and return values - javascriptJava Button Width - javaHow to get PuTTY to pass Ctrl-PgUp and Ctrl_PgDown via ssh? - windowsPaint in JFrame not working (Java) - javaHow to find out what permissions a site administrator and site owner have? - liferayAll Articles