MySQL LOCATE Function vs POSITION and INSTR Functions

Rama Giri
Updated on 30-Jul-2019 22:30:21

535 Views

As all of these functions are used to return the position of a substring within a string but LOCATE() function is a bit different from POSITION() and INSTR() function. In both POSITION() AND INSTR() functions, we cannot manage the starting position of search with the help of argument as position argument in LOCATE() function. All of these functions are having a difference in syntax also.

Regex Named Groups in Java

George John
Updated on 30-Jul-2019 22:30:21

293 Views

Java Regex Capturing Groups

Eliminate Changes in Current MySQL Transaction

Sai Subramanyam
Updated on 30-Jul-2019 22:30:21

129 Views

We can use ROLLBACK command to eliminate the changes, made in a current transaction, permanently from MySQL database. Suppose if we run some DML statements and it updates some data objects, then ROLLBACK command will eliminate these updates permanently from the database. Example Suppose we have the following data in table ‘marks’ and we applied the transaction and ROLLBACK command as follows − mysql> SELECT * FROM Marks; +------+---------+---------+-------+ | Id | Name | Subject | Marks | +------+---------+---------+-------+ | 1 | Aarav | Maths | ... Read More

Java Boolean Operators

Fendadis John
Updated on 30-Jul-2019 22:30:21

10K+ Views

There are following boolean operators supported by Java language.Assume variable A holds 10 and variable B holds 20, then −OperatorDescriptionExample== (equal to)Checks if the values of two operands are equal or not, if yes then condition becomes true.(A == B) is not true.!= (not equal to)Checks if the values of two operands are equal or not, if values are not equal then condition becomes true.(A != B) is true.> (greater than)Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true.(A > B) is not true.< (less than)Checks if the ... Read More

MySQL Function to Append Values of a Column with Single Quotes

Sai Subramanyam
Updated on 30-Jul-2019 22:30:21

124 Views

MySQL QUOTE() function can be used to append values of a column with single quotes. For this, we must have to pass column name as the argument of QUOTE() function. Data from ‘Student’ table is used to demonstrate it as follows Example mysql> Select Name, ID, QUOTE(Subject)AS Subject from Student; +---------+------+-------------+ | Name | ID | Subject | +---------+------+-------------+ | Gaurav | 1 | 'Computers' | | Aarav | 2 | 'History' | | Harshit | 15 ... Read More

Regular Expressions Syntax in Java

Jai Janardhan
Updated on 30-Jul-2019 22:30:21

281 Views

Following is a simple program demonstrating how to use regular expression in Java. Java Regex Characters

Debug Obfuscated JavaScript

Ankitha Reddy
Updated on 30-Jul-2019 22:30:21

637 Views

To debug obfuscated JavaScript code, you need to use a JavaScript formatter or beautifier. Go to the following link to beautify JavaScript, In the left section, add your obfuscated JavaScript code and click Beautify as shown below, On clicking, you can see Beautified JavaScript code in the right section.

Java Unary Operator Examples

Ayyan
Updated on 30-Jul-2019 22:30:21

670 Views

The unary operator works on a single operand. Following are the examples of unary operators supported in java. Assume A = 60 and B = 20.OperatorDescriptionExample~ (bitwise compliment)Binary One's Complement Operator is unary and has the effect of 'flipping' bits.(~A ) will give -61 which is 1100 0011 in 2's complement form due to a signed binary number.++ (Increment)Increases the value of operand by 1.B++ gives 21-- (Decrement)Decreases the value of operand by 1.B-- gives 19

Why Using Namespace std is Considered Bad Practice

Abhinaya
Updated on 30-Jul-2019 22:30:21

458 Views

C++ has a standard library that contains common functionality you use in building your applications like containers, algorithms, etc. If names used by these were out in the open, for example, if they defined a queue class globally, you'd never be able to use the same name again without conflicts. So they created a namespace, std to contain this change.The using namespace statement just means that in the scope it is present, make all the things under the std namespace available without having to prefix std:: before each of them.While this practice is okay for example code, pulling in the ... Read More

What Happens When is Converted to Number in JavaScript

Sai Subramanyam
Updated on 30-Jul-2019 22:30:21

133 Views

Use the Number() method in JavaScript to convert to Number. You can try to run the following code to learn how to convert [50, 100] to Number in JavaScript − Example Live Demo Convert [50,100] to Number var myVal = [50,100]; document.write("Number: " + Number(myVal));

Advertisements