devxlogo

Database Development

Create a Snapshot of Your Database

In order to create a Snapshot of your database, you can use the following code: DECLARE @DBName VARCHAR(100) = ‘DBName’DECLARE @CurrentDate VARCHAR(20)SET @CurrentDate = ‘_’ + CONVERT(VARCHAR(20), GETDATE(), 120)SET @CurrentDate

Summing a COUNT Aggregate SQL Function

The following code snippet shows a small example of how you can sum the result of a count aggregate function. select sum(studentcount) as TotalCountfrom( SELECT count(s.studentname) as studentcount, s.studentname as

Disabling AutoCommit in JDBC

Only once the development part of the project is complete do we tend to look at the performance of our application’s interaction with the database and realize that the transactions

Getting All Stored Procedures Inside a Database

There are essentially two ways to get a list of all Stored Procedures inside your database. Option 1: SELECT *FROM YOUR_DATABASE_NAME.information_schema.routinesWHERE routine_type = ‘PROCEDURE’ORDER BY Specific_name This option checks the