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 - 2005 - Get Current User - Get Logged In User

SQL SERVER – 2005 – Get Current User – Get Logged In User

October 27, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server Security, SQL System Table

How to get current user for a query in SQL Server 2005: SELECT SYSTEM_USER returns the name of the current context, which helps with debugging and security.

Read More
SQL SERVER - Deterministic Functions and Nondeterministic Functions

SQL SERVER – Deterministic Functions and Nondeterministic Functions

October 26, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function

Deterministic functions like ABS, DATEDIFF and ISNULL always return the same result for the same input. Nondeterministic functions like NEWID and RAND do not.

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 - Get Permissions of My Username / Userlogin on Server / Database

SQL SERVER – Get Permissions of My Username / Userlogin on Server / Database

October 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server Security, SQL Stored Procedure, SQL System Table

Invited to review a big company’s schema, I wanted to know my own permissions without asking their DBA. fn_my_permissions shows them at server and database level.

Read More
SQL SERVER - Difference Between @@Version and xp_msver - Retrieve SQL Server Information

SQL SERVER – Difference Between @@Version and xp_msver – Retrieve SQL Server Information

October 22, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Stored Procedure, SQL System Table

SELECT @@Version gives the SQL Server version, edition and service pack in one string. I compare @@Version and xp_msver, which returns more server details.

Read More
SQL SERVER - UDF vs. Stored Procedures and Having vs. WHERE

SQL SERVER – UDF vs. Stored Procedures and Having vs. WHERE

October 10, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Stored Procedure

My first article in SQL Server Magazine, October 2007, covered UDF vs. stored procedures and HAVING vs. WHERE. The article has moved, so its links are off.

Read More
Sql server query results window.

SQL SERVER – 2005 – Sample Example of RANKING Functions – ROW_NUMBER, RANK, DENSE_RANK, NTILE

October 9, 2007
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Scripts

SQL Server 2005 has four ranking functions: ROW_NUMBER, RANK, DENSE_RANK and NTILE. I explain what each returns and show a sample example of all four.

Read More
Previous 1 … 51 52 53 54 55 56 57 … 63 Next
  • Books
  • Testimonials
  • Privacy Policy

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