Karthikeya Boyini has Published 2383 Articles

Why BINARY keyword used with MySQL REGEXP operator?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 13:48:06

450 Views

Use the BINARY keyword to force REGEXP to match the string as a binary string. We will see the difference here.Let us first create a table −mysql> create table DemoTable -> ( -> Name varchar(100) -> ); Query OK, 0 rows affected (0.46 sec)Insert some records in the table using ... Read More

Get the substring of a column in MySQL

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 13:44:57

998 Views

Use the SUBSTR() method to get the substring of a column.Let us first create a table −mysql> create table DemoTable -> ( -> Title text -> ); Query OK, 0 rows affected (0.74 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('This is a MySQL ... Read More

MySQL query to select distinct order by id

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 13:41:18

842 Views

For this, use ORDER BY MAX(). Let us first create a table −mysql> create table DemoTable    -> (    -> Id int,    -> Name varchar(100)    -> ); Query OK, 0 rows affected (0.81 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(10, ... Read More

MySQL query to get the count of all the elements in the field?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 13:40:15

70 Views

For this, use the COUNT() method. Let us first create a table −mysql> create table DemoTable -> ( -> ProductName varchar(100) -> ); Query OK, 0 rows affected (0.59 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Product-1'); Query OK, 1 row affected (0.26 sec) ... Read More

MySQL query to select date from timestamp?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 13:21:07

371 Views

Let us first create a table. One of the column is a timestamp −mysql> create table DemoTable    -> (    -> CustomerName varchar(100),    -> CustomerShippingDate timestamp    -> ); Query OK, 0 rows affected (0.52 sec)Insert some records in the table using insert command −mysql> insert into DemoTable ... Read More

How to get first element in android ConcurrentLinkedDeque?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 13:19:46

85 Views

Before getting into example, we should know what ConcurrentLinkedDequeis, it is unbounded deque based on linked nodes. Multiple threads can access deque elements with safety.This example demonstrate about How to get first element in android ConcurrentLinkedDequeStep 1 − Create a new project in Android Studio, go to File ⇒ New ... Read More

How to find size of ArrayBlockingQueue in android?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 13:18:42

56 Views

Before getting into example, we should know what arrayblockingqueue is, it travels FIFO manner and first element going to live longest period of time and last element of the queue going to live short period of the time.This example demonstrate about How to find size of ArrayBlockingQueue in androidStep 1 ... Read More

How to find element in android ConcurrentLinkedQueue?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 13:05:21

82 Views

Before getting into example, we should know what ConcurrentLinkedQueueis, it is unbounded queue based on linked nodes. Multiple threads can access queue elements with safety. Elements travel based on queue strategy as FIFO and elements going to insert from tail. It does not allow null values.This example demonstrate about How ... Read More

Compare two tables and return missing ids in MySQL?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 13:02:19

1K+ Views

To compare two tables and return missing ids, you need to use a subquery. The syntax is as follows −SELECT yourFirstTableName.yourIdColumnName FROM yourFirstTableName WHERE NOT IN(SELECT yourSecondTableName.yourIdColumnName FROM youSecondTableName);To understand the above syntax, let us create a table with sample fields and then we will insert records. The query to ... Read More

How to covert ConcurrentLinkedQueue to array in android?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jun-2020 13:02:11

84 Views

Before getting into example, we should know what ConcurrentLinkedQueueis, it is unbounded queue based on linked nodes. Multiple threads can access queue elements with safety. Elements travel based on queue strategy as FIFO and elements going to insert from tail. It does not allow null values.This example demonstrate about How ... Read More

Advertisements