Ankith Reddy has Published 1070 Articles

How to use RatingBar in android?

Ankith Reddy

Ankith Reddy

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

2K+ Views

Before getting into an example, we should know what is rating bar in android. Rating bar is a subclass of absSeekbar class in android. It is used to show the rating on view Group or window manager.This example demonstrates how to use the rating bar in android.Step 1 − Create ... Read More

Changing Column in MySQL from int to double?

Ankith Reddy

Ankith Reddy

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

4K+ Views

To change the column in MySQL from int to double you need to use ALTER TABLE command.The syntax is as follows:ALTER TABLE yourTableName modify column yourColumnName DOUBLE NOT NULL;If you want NULL value then remove NOT NULL from the above syntax. The syntax is as follows:ALTER TABLE yourTableName modify column ... Read More

MySQL stored-procedure: out parameter?

Ankith Reddy

Ankith Reddy

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

749 Views

Here is a stored procedure that takes one parameter for input (IN) and second parameter for output (OUT)mysql> delimiter // mysql> create procedure Sp_SQRT(IN Number1 INT, OUT Number2 FLOAT) -> Begin -> set Number2=sqrt(Number1); -> end; -> // ... Read More

Split a string and loop through values in MySQL Procedure?

Ankith Reddy

Ankith Reddy

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

4K+ Views

To split a string and loop through all values in MySQL procedure, you do not need to use REPLACE() function. To understand, first create a stored procedure and after that create a table and call the stored procedure with some values. The value will be inserted into the table.The query ... Read More

Android Working with Recycler View

Ankith Reddy

Ankith Reddy

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

2K+ Views

Recycler view is a more advanced version of listview and works based on View holder design pattern. Using recyclerview we can show grids as well as a list of items.This example demonstrates how to integrate RecyclerView by creating a beautiful student records app that displays student name with age.Step 1 ... Read More

How to display records vertically in MySQL command line?

Ankith Reddy

Ankith Reddy

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

2K+ Views

You can use backward slash followed by G i.e. \G instead of semicolon(;). The syntax is as follows to show records vertically in MySQL command line.SELECT *FROM yourTableName\GTo understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table showRecordsVertically ... Read More

How to get the sum for every distinct value in another column in MySQL?

Ankith Reddy

Ankith Reddy

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

2K+ Views

You can get the sum for every distinct value in another column with the help of aggregate function SUM() with GROUP BY command. To understand the above concept, let us create a table. The query to create a table is as follows:mysql> create table SumOfEveryDistinct -> ( ... Read More

How to use GROUP BY to concatenate strings in MySQL and how to set a separator for the concatenation?

Ankith Reddy

Ankith Reddy

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

8K+ Views

To concatenate strings in MySQL with GROUP BY, you need to use GROUP_CONCAT() with a SEPARATOR parameter which may be comma(‘) or space (‘ ‘) etc.The syntax is as follows:SELECT yourColumnName1, GROUP_CONCAT(yourColumnName2 SEPARATOR ‘yourValue’) as anyVariableName FROM yourTableName GROUP BY yourColumnName1;To understand the above syntax, let us create a table. ... Read More

Combine INSERT, VALUES, and SELECT in MySQL

Ankith Reddy

Ankith Reddy

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

1K+ Views

You can combine the insert, values and select statement using below syntaxinsert into yourFirstTableName(yourColumnName1, yourColumnName2, .......N) select yourColumnName1, yourColumnName2, .......N from yourSecondTableName where yourCondition;To understand the above syntax, let us create two tables in which first table will get the record from the second table.Let us create the first table ... Read More

How to find all uppercase strings in a MySQL table?

Ankith Reddy

Ankith Reddy

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

750 Views

To find all upper case strings in a MySQL table, you need to use BINARY UPPER() function. The syntax is as follows:SELECT *FROM yourTableName WHERE yourColumnName=BINARY UPPER(yourColumnName);To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table FindUpperCaseDemo    -> ... Read More

Advertisements