我偶尔会遇到此错误。我将尝试从表中检索行,但遇到此错误。奇怪的是,即使我尝试选择一个字符串或字符,它也根本不起作用。但是,分配工作。我已经完成了select语句,其结果在100,000s,但是最终它达到了一个断点,我什至无法选择硬编码的字符串。
CREATE TABLE test
(id INT NOT NULL)
INSERT INTO test
VALUES (1)
UPDATE test
SET id = 2
where id = 1
--Select statements in the form of assignments work
DECLARE @id TINYINT = 0
SELECT @id = id FROM test
--Print still works : This prints 0
PRINT @id
--Error occurs at this select statement : Error message is :
System.OutOfMemoryException
SELECT * FROM test
DROP TABLE test