
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ankith Reddy has Published 996 Articles

Ankith Reddy
323 Views
Suppose the LIMIT is 4 and OFFSET is 6 then it will return the rows from 7 to 10 i.e. will end with row 10. The LIMIT 4 and OFFSET 6 returns row 7, 8, 9, 10.You can understand the above concept by implementing LIMIT and OFFSET. Let us create ... Read More

Ankith Reddy
469 Views
You can achieve this with the help of INFORMATION_SCHEMA.TABLES. Use the date_sub() with interval. The syntax is as follows −SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE DATE_SUB(NOW(), INTERVAL -1HOUR) < ‘UPDATE_TIME’;Now you can check the above syntax. Here is the query to find the tables modified in the last hour −mysql> select ... Read More

Ankith Reddy
12K+ Views
You can use aggregate function count() with group by. The syntax is as follows.select yourColumnName, count(*) as anyVariableName from yourtableName group by yourColumnName;To understand the above syntax, let us create a table. The query to create a table is as follows.mysql> create table CountSameValue -> ( -> Id int, -> ... Read More

Ankith Reddy
2K+ Views
Before getting into an example, we should know what is toast in android. Toast is subclass for java.lang.Object and used to show a short message for a short period of time after that is going to disappear.This example demonstrates how to change the position of Toast in Android.Step 1 - ... Read More

Ankith Reddy
6K+ Views
You cannot do select IN range. For the same result, use BETWEEN. Let us see an example −IN(start, end): It means that the intermediate value between start and end won’t get displayed. For the above logic, you can use BETWEEN.BETWEEN clause is inclusive, for example, suppose there are 1, 2, ... Read More

Ankith Reddy
3K+ Views
A ternary conditional operator looks like ?: in programming language like C, C++, Java etc. The syntax is as follows −(yourCondition) ? statement1:statement2;In the above syntax, if yourCondition becomes true then statement1 will evaluate and if yourCondition becomes false then statement2 will evaluate.But the above syntax does not work in ... Read More

Ankith Reddy
3K+ Views
To view stored procedure/function definition in MySQL, you can use show command. The syntax is as follows −SHOW CREATE PROCEDURE yourProcedureName;To understand the above syntax, you can create a procedure and check that definition. Let us create a stored procedure −mysql> delimiter // mysql> create procedure AllRecords() -> begin ... Read More

Ankith Reddy
250 Views
You can count all rows per table with the help of aggregate function count (TABLE_ROWS) from informatio_schema.tables. The syntax is as follows −SELECT table_name, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'yourDatabaseName';Now you can apply the above syntax to get all rows per table. The query is as follows −mysql> SELECT ... Read More

Ankith Reddy
1K+ Views
This example demonstrates how to make a smooth image rotation in Android.Step 1 - Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 - Add the following code to res/layout/activity_main.xml. ... Read More

Ankith Reddy
20K+ Views
A Set is a generic set of values with no duplicate elements. A TreeSet is a set where the elements are sorted.A HashSet is a set where the elements are not sorted or ordered. It is faster than a TreeSet. The HashSet is an implementation of a Set.Set is a ... Read More