Skip to content
Advertisement

Asynchronous Triggers in SQL Server 2005/2008

I have triggers that manipulate and insert a lot of data into a Change tracking table for audit purposes on every insert, update and delete. This trigger does its job very well, by using it we are …

MS Sql: Conditional ORDER BY ASC/DESC Question

I want to to make to make the ordering in my query conditional so if it satisfiess the condition it should be ordered by descending For instance: Answer Don’t change the ASC or DESC, change the sign of the thing being sorted-by: The OP asks: Guys, I am not the SQL Expert, please explain me what means the id and

Are there multiline comment delimiters in SQL that are vendor-agnostic?

While editing, building up, or cherry picking from SQL statements I can find myself interacting with one of four popular database tools. I have been resorting to single line commenting for DB2 and Informix. I have created macros in Vim to make this slightly more efficient, but I was wondering if I am working too hard. Answer C style comments

Difference between CTE and SubQuery?

From this post How to use ROW_NUMBER in the following procedure? There are two versions of answers where one uses a sub-query and the other uses a CTE to solve the same problem. Now then, what is the advantage of using a CTE (Common Table Expression) over a ‘sub-query`(thus, more readable what the query is actually doing) The only advantage

Advertisement