
Search In
A transaction is used to check whether all SQL statements get executed successfully or not. A Single transaction starts with a particular statement and ends after the completion of all the SQL statements executed successfully. If all SQL statements f
Rake is a Ruby task management tool. Like in Unix we have 'make' utility.
So we can say Rake is Ruby Make. It uses a Rakefile and .rake files to create a list of tasks.
We can see all the Rake tasks available in our current directory by one o
Selection sort as the name suggests, first select the least element from the entire list in every iteration and swap it with the position for which iteration is being performed.
In the given figure it is seen that in the first iteration the
How to Work with a Stored Procedure
DELIMITER //
CREATE PROCEDURE `p2` ()
LANGUAGE SQL
DETERMINISTIC
SQL SECURITY DEFINER
COMMENT 'A procedure'
BEGIN
SELECT 'Hello World !';
END//
The four characteristics of a procedure are:
Language : For p
Exception Handling in Rails using begin rescue
Exception is a condition, that occurs when something goes wrong in a code. Normally in that case the program gets terminated. In rails, an object containing the information of the error is an instance o
Sometimes we need to display the records in a specific order. For that, we need some method
Suppose I have the priorities ['0', '8', '4'] .And I have a model event with priority column.
Now I need to get all the events order
Exception is a unexpected output during execution of code in programing language. Due to exception execution of program stops.In Ruby, Exceptions are basically used to handle different type of errors, which may raise during execution of program and w
Description:
Sum all the numbers of the array except the highest and the lowest element.
Example: { 6, 2, 1, 8, 10 } => 16
If array is empty or null, or if only 1 Element exists, return 0.
Test Cases:
Test.describe("Basic tests") do
Blocks are basically a group of code that can be stored in a parameter and can be executed. There are majorly two ways of doing this:
1) Implicit:
In implicit, it is a nameless block and it is not passed as a parameter, it is executed using
As we all know in SQL transaction are used to maintain the integrity of the data, so that if there are multiple queries written, which has a condition that either all of them are executed or none. So for achieving those rails has written the wrappers
