News

T-SQL Tips -- GO # and WHILE Loops Two quick tricks: populating a table with data quickly, and boosting performance with WHILE loops. By Joshua Jones 07/12/2010 While there are a great many books ...
SQL Server does not have a traditional FOR loop like some other programming languages. However, you can achieve similar functionality using a WHILE loop with a counter variable.
In SQL Server, a cursor is a database object that allows you to process the rows of a result set one at a time. This is in contrast to standard T-SQL operations, which typically work on entire sets of ...
The problem I run into is that that MariaDB is treating the WHILE line, the INSERT, and the VALUES line as one line. Normally, I’d expect this out of SQL, as it stops reading a line at the ...
While there are a great many books, blogs, and articles out there on T-SQL, there are always a few little "tricks" that many people overlook, or that many authors assume readers know.