Values (1)
Union all
Select the n + 1 from t where n<100)
Select sum (n) from t
How do the above SQL statement to the grammar mistakes? consult
CodePudding user response:
Already know, thank you, should be t into keyword cteCodePudding user response:
T is just a temporary table the table name is not a keyword, your mistake in the initialization of the first SQLwith recursive t (n) as (
Select 1
Union all
Select the n + 1 from t where n<100)
Select sum (n) from t
CodePudding user response:
You should see the cte of is official manual take the Table name, is a Common Table Expressions of shorthand, is not a keyword,