
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
Chandu yadav has Published 1091 Articles

Chandu yadav
1K+ Views
To select the top 2 rows from each group, use the where condition with subquery. Let us create a table. The query to create a table is as follows:mysql> create table selectTop2FromEachGroup -> ( -> Name varchar(20), -> TotalScores int -> ); Query OK, 0 rows ... Read More

Chandu yadav
497 Views
You can use substring_index() function from MySQL to split the left part of a string. The syntax is as follows −SELECT yourColumnName1, .....N, SUBSTRING_INDEX(yourColumnName, ’yourSeperatorSymbol’, 1) as anyVariableName from yourTableName;The value 1 indicates that you can get left part of string. To check the above syntax, let us create a ... Read More

Chandu yadav
1K+ Views
You can truncate the text with ellipsis using LENGTH() with CASE statement. If your length is greater than 7 then truncate the text and add some number otherwise print the number as it is.To understand the above syntax, let us create a table. The query to create a table is ... Read More

Chandu yadav
335 Views
Here are the simple steps to change the package name in android .Click on your pack name(in source tree). -> Right Click --> Refractor -> Rename as shown below -Click on rename, it will show pop up as shown below -Click on Rename package, it will show new pop up ... Read More

Chandu yadav
14K+ Views
The DDL stands for Data Definition Language. To generate the table DDL via query, you can use show create command.The syntax is as followsSHOW CREATE TABLE yourTableName;The above syntax is MySQL specific. Suppose, we have a table with the name ‘DDLOfTableStudent’.First, create a table with the name ‘DDLOfTableStudent’. The query ... Read More

Chandu yadav
841 Views
To get the last index, use the SUBSTRING_INDEX() function from MySQL. The syntax is as follows −SELECT yourColumnName1, ...N, SUBSTRING_INDEX(yourColumnName, ’yourDelimiter’, -1)as anyVariableName from yourTableName;To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table LastIndexString -> ( ... Read More

Chandu yadav
2K+ Views
Before getting into Sort array list elements for recycler view example, we should know, what is Recycler view in android. Recycler view is a more advanced version of the list view and it works based on View holder design pattern. Using recycler view we can show grids and list of ... Read More

Chandu yadav
145 Views
In order to do insert a row and get the content, you need to use stored procedure, First, you need to create a table. After that you need to create a stored procedure that will insert a row and get the content to the end user.To do the above task, ... Read More

Chandu yadav
4K+ Views
You can declare a variable using @anyVariablename which is a session variable. To create a session variable, you need to use SET command.The syntax is as followsSET @anyVariableName:=anyValue;You can declare a local variable using DECLARE command. The syntax is as followsDECLARE yourVariableName datatypeYou can set the default value at the ... Read More

Chandu yadav
2K+ Views
You need to select a database when you are creating a table. Right now, I have a sample database. The snapshot is as follows:Now you need to give the table name as well as the number of columns you want:After that you need to press Go button. Now, the following ... Read More