This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - Readers Contribution to Site - Simple Example of Cursor

SQL SERVER – Readers Contribution to Site – Simple Example of Cursor

July 16, 2008
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Scripts

A reader wanted to join values from several rows into one record. Imran Mohammed answered with a simple example of cursor code in SQL Server 2005.

Read More
A vinyl record turning on a turntable with the needle resting in the run-out groove.

SQL SERVER – Is Cursor Database Object or Datatype?

April 19, 2008
Pinal Dave
SQL Interview Questions and Answers
SQL Cursor, SQL Server

Whenever we want to loop something we always look for logic like WHILE LOOP or FOR LOOP. Trust me on my word that both of them are cursor when it is about SQL Server.

Read More
SQL SERVER - Simple Example of Cursor - Sample Cursor Part 2

SQL SERVER – Simple Example of Cursor – Sample Cursor Part 2

March 5, 2008
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Scripts

A reader asked me to update my Simple Example of Cursor with AdventureWorks. Here is a sample cursor that loops through ProductID and prints each one.

Read More
SQLAuthority News - Best Articles on SQLAuthority.com

SQLAuthority News – Best Articles on SQLAuthority.com

November 4, 2007
Pinal Dave
SQL Interview Questions and Answers
Data Warehousing, Database, DBA, Software Development, SQL Backup and Restore, SQL Coding Standards, SQL Constraint and Keys, SQL Cursor, SQL DateTime, SQL Download, SQL Error Messages, SQL Function, SQL Humor, SQL Index, SQL Joins, SQL Scripts, SQL Server DBCC, SQL Server Security, SQL Stored Procedure, SQL Trigger, SQL Utility

A list of my best articles so far, from killing all processes in a database and shrinking the log file to deleting duplicate rows and UNION vs UNION ALL.

Read More
break

SQL SERVER – Simple Example of WHILE Loop With CONTINUE and BREAK Keywords

October 24, 2007
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Function, SQL Scripts, SQL Server

I have tried to explain the usage of simple WHILE loop in the first example. BREAK keywords will exit the stop the while loop and control is moved.

Read More
SQL SERVER - Stored Procedure to Know Database Access Permission to Current User

SQL SERVER – Stored Procedure to Know Database Access Permission to Current User

September 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Scripts, SQL Stored Procedure, Undocumented SQL

Which databases can I use? Run EXEC sp_MShasdbaccess to see the database access permission of the current user. Our Jr. DBAs check it all the time.

Read More
SQL SERVER - Difference Between EXEC and EXECUTE vs EXEC() - Use EXEC/EXECUTE for SP always

SQL SERVER – Difference Between EXEC and EXECUTE vs EXEC() – Use EXEC/EXECUTE for SP always

September 13, 2007
Pinal Dave
SQL Tips and Tricks
DBA, SQL Cursor, SQL Scripts, SQL Stored Procedure

What is the difference between EXEC and EXECUTE? None. The real difference is EXEC vs EXEC(), and I show why EXEC belongs before every stored procedure call.

Read More
Previous 1 2 3 4 5 6 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com