Manikanth Mani

Manikanth Mani

28 Articles Published

Articles by Manikanth Mani

Page 3 of 3

What happens if I will use integer values as arguments of MySQL LOCATE() function?

Manikanth Mani
Manikanth Mani
Updated on 03-Feb-2020 141 Views

MySQL allows us to use integer values as the arguments of the LOCATE() function. We do not need to use quotes. It can be demonstrated with the help of the following example −Examplemysql> Select LOCATE(5,1698235); +-------------------+ | LOCATE(5,1698235) | +-------------------+ |                 7 | +-------------------+ 1 row in set (0.00 sec) mysql> Select LOCATE(56,1698235); +--------------------+ | LOCATE(56,1698235) | +--------------------+ |                  0 | +--------------------+ 1 row in set (0.00 sec) mysql> Select LOCATE(23,1698235); +--------------------+ | LOCATE(23,1698235) | +--------------------+ |                  5 | +--------------------+ 1 row in set (0.00 sec)

Read More

How can CONCAT() function be applied on columns of MySQL table?

Manikanth Mani
Manikanth Mani
Updated on 30-Jan-2020 217 Views

We can use CONCAT() function to combine the values of two or more columns. In this case, the arguments of the CONCAT() functions would be the name of the columns. For example, suppose we have a table named ‘Student’ and we want the name and address of the student collectively in one column then the following query can be written −mysql> Select Id, Name, Address, CONCAT(ID, ', ', Name, ', ', Address)AS 'ID, Name, Address' from Student; +------+---------+---------+--------------------+ | Id   | Name    | Address | ID, Name, Address  | +------+---------+---------+--------------------+ | 1    | Gaurav  | Delhi   ...

Read More

What do you mean by default MySQL database for the user?

Manikanth Mani
Manikanth Mani
Updated on 28-Jan-2020 325 Views

Actually, there is no default database for the user. But we have default database for the current session. It can be seen from the following query −mysql> Select Database(); +------------+ | Database() | +------------+ | sample     | +------------+ 1 row in set (0.00 sec)The above result set shows that we are using ‘sample’ database currently. It is set for the current session. We can set another database, with the help of USE statement, also for the current session as follows −mysql> USE query; Database changed mysql> Select Database(); +------------+ | Database() | +------------+ | query     ...

Read More

How can I check MySQL tables from a database in accordance with particularncolumn/s name?

Manikanth Mani
Manikanth Mani
Updated on 28-Jan-2020 145 Views

The following statement shows the list of two tables having a column ‘email’ in Sample database −mysql> SELECT DISTINCT TABLE_NAME     -> FROM INFORMATION_SCHEMA.COLUMNS     -> WHERE COLUMN_NAME IN('EMAIL')     -> AND TABLE_SCHEMA = 'SAMPLE'; +---------------+ | TABLE_NAME    | +---------------+ | employee      | | new_student   | +---------------+ 2 rows in set (0.04 sec)

Read More

Generating any custom JSON in ABAP

Manikanth Mani
Manikanth Mani
Updated on 05-Dec-2019 2K+ Views

You can use class ZCL_MDP_JSON Library that can encode/parse any JSON. JSON is supported natively in ABAP by the following features:With the use of JSON-XML- it is known as special XML format that can be used for JSON data to be described using an XML representation. By defining a mapping between ABAP types and JSON. This is used in serializations and deserializations using the identity transformation ID.As you can specify JSON data in different forms as an XML source in the statement CALL TRANSFORMATION and JSON can be specified as a target.Check out the following sample code:Example:DATA text TYPE string VALUE ...

Read More

Constructors of StringBuilder class in Java.

Manikanth Mani
Manikanth Mani
Updated on 30-Jul-2019 432 Views

The StringBuilder class of the java.lang package is a mutable sequence of characters. This provides an API compatible with StringBuffer, but with no guarantee of synchronization. Following are the list of constructors provided by the StringBuilder class.S.N.Constructor & Description1StringBuilder()This constructs a string builder with no characters in it and an initial capacity of 16 characters.2StringBuilder(CharSequence seq)This constructs a string builder that contains the same characters as the specified CharSequence.3StringBuilder(int capacity)This constructs a string builder with no characters in it and an initial capacity specified by the capacity argument.4StringBuilder(String str)This constructs a string builder initialized to the contents of the specified string. ...

Read More

How to set Java Path in Linux OS?

Manikanth Mani
Manikanth Mani
Updated on 30-Jul-2019 485 Views

Environment variable PATH should be set to point to where the Java binaries have been installed. Refer to your shell documentation if you have trouble doing this.Example, if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export PATH=/path/to/java:$PATH'

Read More

How to set JAVA_HOME for Java in Mac OS?

Manikanth Mani
Manikanth Mani
Updated on 30-Jul-2019 768 Views

Assuming you have installed Java in \usr\local\java\jdk directory −if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export JAVA_HOME=\usr\local\java\jdk'

Read More
Showing 21–28 of 28 articles
« Prev 1 2 3 Next »
Advertisements