What is MySQL INTERVAL Function

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

516 Views

MySQL INTERVAL() function returns the index value of the argument which is greater than the first argument. Syntax INTERVAL(N,N1,N2,N3,…) Here, this function will compare 1st argument i.e. N with the other arguments i.e. N1, N2, N3 and so on. All the arguments are treated as integers. It returns the output as follows − If N

The Auto Storage Class in C++

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:21

253 Views

In C, The auto storage class specifier lets you explicitly declare a variable with automatic storage. The auto storage class is the default for variables declared inside a block. A variable x that has automatic storage is deleted when the block in which x was declared exits.You can only apply the auto storage class specifier to names of variables declared in a block or to names of function parameters. However, these names by default have automatic storage. Therefore the storage class specifier auto is usually redundant in a data declaration.It was initially carried over to C++ for syntactical compatibility only, ... Read More

Compare Strings in Java

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

270 Views

https://www.tutorialspoint.com/javaexamples/string_compare.htm

String in Switch Case in Java

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

249 Views

A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each case.Example Live Demopublic class Test {    public static void main(String args[]) {       // char grade = args[0].charAt(0);       char grade = 'C';       switch(grade) {          case 'A' :             System.out.println("Excellent!");             break;          case 'B' :          case 'C' :   ... Read More

The Register Storage Class in C++

Nitya Raut
Updated on 30-Jul-2019 22:30:21

370 Views

In C, the register storage class specifier indicates to the compiler that the object should be stored in a machine register. The register storage class specifier is typically specified for heavily used variables, such as a loop control variable, in the hopes of enhancing performance by minimizing access time. However, the compiler is not required to honor this request. Because of the limited size and number of registers available on most systems, few variables can actually be put in registers.In C++ it is simply an unused reserved keyword, but it's reasonable to assume that it was kept for syntactical compatibility ... Read More

RAND Function Behavior in SQL Queries

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

309 Views

We know that MySQL RAND() returns a random floating point value between the range of 0 and 1. It will generate two different random numbers if we will call the RAND() function, without seed, two times in the same query. Following example will make it clearer − Example mysql> Select RAND(), RAND(), Rand(); +--------------------+-------------------+--------------------+ | RAND() | RAND() | Rand() | +--------------------+-------------------+--------------------+ | 0.9402844448949066 | 0.911499003797303 | 0.7366417150354402 | +--------------------+-------------------+--------------------+ 1 row in set (0.00 sec) The above result set shows that RAND() function will generate different random number every time we call it.

Concatenate Lists in Java

Abhinanda Shri
Updated on 30-Jul-2019 22:30:21

669 Views

The addAll(Collection

Difference Between Size of ArrayList and Length of Array in Java

Srinivas Gorla
Updated on 30-Jul-2019 22:30:21

2K+ Views

ArrayList doesn't have length() method, the size() method of ArrayList provides the number of objects available in the collection.Array has length property which provides the length or capacity of the Array. It is the total space allocated during the initialization of the array.

How Many Python Classes Should I Put in One File?

Rajendra Dharmkar
Updated on 30-Jul-2019 22:30:21

3K+ Views

Python code is organized in files called "modules" and groups of related modules called “packages".A module is a distinct unit that may have one or more closely-related classes. Modules need to be imported before they are read, used, maintained and extended if needed. So a module is a unit or reuse.The rule is this: a module is the unit of reuse. Everything in Python libraries and other Python applications is either a module or a package of modules.There is no limit on how many classes one can put in a file or a module. It all depends on how big ... Read More

Fetch Value of REPLACE Function in Column Name

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

127 Views

For fetching the values of REPLACE() function in our choice column name, we need to use the keyword ‘AS’ with REPLACE() function. Example mysql> Select Name, REPLACE(Name, 'G','S') AS Name_Changed from student Where Subject = 'Computers'; +--------+--------------+ | Name | Name_Changed | +--------+--------------+ | Gaurav | Saurav | | Gaurav | Saurav | +--------+--------------+ 2 rows in set (0.00 sec) The query above will give the result set of REPLACE() function in column name of our choice ‘Name_Changed’ which is given after keyword ‘AS’.

Advertisements