Recursion Recursion is the technique in which a function calls itself from within its own body.You can find out more about what is recursion and see some examples in various programming languages, a good resource is this one. Common Table Expression It is possible to achieve a recursion within a SQL query.This is possible with … Continue reading Recursive SQL queries
Category: SQL
Quickly check a connection to DB Server (Windows)
One way of a quick connection test to a certain Database server can be done by creating a udl file (Microsoft Universal Data Link File). Create a new file with extension .udl (e.g. TestConnection.udl)Open the newly created file: 3. Fill in the data - Choose Provider - Fill the connection settings and click "Test Connection"
Connect to inactive node on clustered environment through SSMS (SQL Server)
If you are using Azure SQL Server and you have already configured a clustered environment to implement a high-availability architecture in Azure SQL database you will have one active node.The rest will be accessible only in read-only mode.When you connect to some of the inactive nodes through SQL Server Management Studio and try to open … Continue reading Connect to inactive node on clustered environment through SSMS (SQL Server)
Search for an object in SQL Server
Photo by Oleg Ivanov on Unsplash If you have a big database structure with lots of databases, plenty of tables, views, stored procedures, functions, etc., sometimes you are lost in all the objects in your server. The good news is that there are ways to handle this situation. sys.objects view You can easily find an object in your … Continue reading Search for an object in SQL Server
The NULL in SQL Server
Dealing with NULLs can always be fun in SQL Server. Creation of nullable columns can bring some complexity in the application logic and should be handled with caution. Kalen Delaney recommends in his book "Microsoft SQL Server 2012 Internals" to never allow NULL values in our tables. However there are some cases that requires using … Continue reading The NULL in SQL Server