Is it possible to modify the default SQL in query analyzer for 'edit top 200 rows'?

StackOverflow https://stackoverflow.com/questions/14223782

  •  14-01-2022
  •  | 
  •  

Pergunta

What if I want to edit the bottom 200 rows, or a custom query, is this possible?

Foi útil?

Solução

You should be able to do the following:

  1. Load the query window with the edit 200 rows
  2. From the Query Designer Menu > Pane > SQL or use the SQL button from the Query Designer toolbar
  3. Edit the query to the number of rows that you want or order by ID, etc
  4. Execute the new query and the window will be refreshed.

Outras dicas

When you click on "edit Top 200 rows", there is a button on the top right corner that says "SQL", when you click on that, you can write your custom query.

screenshot of SQL pane button

If you want the default value for the edit TOP n rows, you can go to "Tools->Options->SQL Server Object Explorer" and edit the 200 there.

I'm not sure about Query Analyzer, but in Management Studio you can right click and select Pane > SQL to view/edit the SQL query used

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top