Question

I try to duplicate a table using DB tools of PhpStorm from SQL SERVER, this table has 1300 rows, when I run the code to duplicate table, the new table got just 500 rows.

This is the code that I use to duplicate:

SELECT * INTO TableBK FROM OldTable

If I use this code directly in SQL Server Management Studio, duplicate is successful but PhpStorm.

What could I do to get all records in new table using PhpStorm?

Also I try

SELECT TOP 2000 * INTO TableBK FROM OldTable

But got the same problem.

Était-ce utile?

La solution

Sounds like PhpStorm defines TOP limit (e.g. by using SET ROWCOUNT) which is then used for other queries.

Try changing the value at Settings | Database | Result set page size from default 500 to whatever you think will suit you best (setting it to 0 should remove this limit).

Alternatively try adding SET ROWCOUNT 0; before the SQL command that you are going to execute in SQL Console.


UPDATE 2022-11-17

Current 2022.2 IDE version has it changed. It is now located at Settings/Preferences | Tools | Database | Data Editor and Viewer screen and would be either Limit page size to or Result set prefetch size option.

enter image description here

https://www.jetbrains.com/help/phpstorm/2022.2/settings-tools-database-data-views.html

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top