Samual Sam has Published 2492 Articles

Is it possible to have View and table with the same name in MySQL?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

1K+ Views

No, you cannot give the same name for view and table in MySQL.Let us first create a demo table −mysql> create table view_Table_Demo    -> (    -> Id int,    -> Name varchar(20)    -> ); Query OK, 0 rows affected (0.80 sec)Now you can insert some records in ... Read More

How to select MySQL rows in the order of IN clause?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

104 Views

You need to use FIND_IN_SET() function to select MySQL rows in the order of IN clause. The syntax is as follows −SELECT yourVariableName.* FROM yourTableName yourVariableName WHERE yourVariableName.yourColumnName IN(value1, value2, ...N) ORDER BY FIND_IN_SET( yourVariableName.yourColumnName, 'value1, value2, ...N');To understand the above syntax, let us create a table. The query to ... Read More

Create Triplet Tuple from another collection in Java

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

73 Views

Use the fromCollection() to create a Triplet tuple from another collection. Here, we will create a tuple from List Collection, but let us first see what we need Let us first see what we need to work with JavaTuples. To work with JavaTuples. Let us first see what we need ... Read More

Instant minusMillis() method in Java

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

162 Views

An immutable copy of a instant where some milliseconds are subtracted from it can be obtained using the minusMillis() method in the Instant class in Java. This method requires a single parameter i.e. the number of milliseconds to be subtracted and it returns the instant with the subtracted milliseconds.A program ... Read More

ByteBuffer equals() method in Java

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

371 Views

The equality of two buffers can be checked using the method equals() in the class java.nio.ByteBuffer. Two buffers are equal if they have the same type of elements, the same number of elements and the same sequence of elements. The method equals() returns true if the buffers are equal and ... Read More

How to send a email with attachment using a JSP page?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

343 Views

Following is an example to send an email with attachment from your machine −Example Send Attachment Email using JSP ... Read More

Use JOIN to select record with more than one condition using AND?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

95 Views

Let us first create a demo table −mysql> create table selectPerson    -> (    -> PersonId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> PersonName varchar(20),    -> PersonFavouriteFruit varchar(60)    -> ); Query OK, 0 rows affected (0.58 sec)Insert some records in the table using insert command. The ... Read More

Unset an attribute from a single array element in MongoDB?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

105 Views

Use $unset operator to unset an attribute. Let us first create a collection with documents −> db.unsetAnAttributeDemo.insertOne( ...    { ...       _id: 1, ...       "StudentDetails": [ ...          { ...             "StudentFirstName": "Ramit", ...     ... Read More

Duration between() method in Java

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

1K+ Views

The duration between two temporal objects can be obtained using the method between() in the Duration class in Java. This method requires two parameters i.e. the start duration and the end duration. Also, it returns the duration between these two temporal duration objects.A program that demonstrates this is given as ... Read More

Create Triplet Tuple from List in Java

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

154 Views

Use the fromCollection() to create a Triplet tuple from List Collection, but let us first see what we need Let us first see what we need to work with JavaTuples. To work with JavaTuples. Let us first see what we need to work with JavaTuples. To work with Triplet class ... Read More

Advertisements