Anonymous Asked in Cars &Transportation · 2 weeks ago

How do you store the results of SQL query in a table?

If the destination table does not exist, you can create it first with a CREATE TABLE statement, and then copy rows into it with INSERT .SELECT . A second option is to use CREATE TABLE . SELECT , which creates the destination table directly from the result of the SELECT .


How do you store the result of a query?

To store query result in one or more variables, you use the SELECT INTO variable syntax:1SELECT c1, c2, c3, ... ... 2SELECT city INTO @city FROM customers WHERE customerNumber = 103;3SELECT @city;4SELECT city, country INTO @city, @country FROM customers WHERE customerNumber = 103;5SELECT @city, @country;

How do I show SQL query results?

You have the option of displaying your query results on the Run SQL window, as opposed to Data Display windows. To do this, go to View > Data Grid (Ctrl+G). Once you have selected this option, a panel will appear at the bottom of the window - your query results will be displayed there.

Related Questions

Relevance
Write us your question, the answer will be received in 24 hours