- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 1163 Articles
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
887 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](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
231 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](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
12K+ 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](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
4K+ Views
You need to use SIGNAL SQL STATE command to stop an insert or update in MySQL. The trigger syntax is as follows:DELIMITER // CREATE TRIGGER yourTriggerName BEFORE INSERT ON yourTableName FOR EACH ROW BEGIN yourCondition THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'anyMessageToEndUser'; END // DELIMITER ;Now, create a trigger ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
602 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](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
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](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
97 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](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
3K+ 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](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
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
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
173 Views
You can get max and second max salary from an Employee table using subquery.Let us first create a table. The query to create a table is as follows −mysql> create table EmployeeMaxAndSecondMaxSalary -> ( -> EmployeeId int, -> Employeename varchar(20), -> EmployeeSalary int -> ); ... Read More