- 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
Rishi Rathor has Published 155 Articles
Rishi Rathor
409 Views
To get difference between two timestamps in seconds, use two in-built functions TIME_TO_SEC() and TIMEDIFF() in MySQL. The syntax is as follows −select time_to_sec(timediff(yourCoulnName1, yourCoulnName2)) as anyVariableName from yourTableName;To understand the above concept, let us first create a table. The query to create a table.mysql> create table TimeToSecond ... Read More
Rishi Rathor
435 Views
Set column charset using character SET command. The syntax is as follows −ALTER TABLE yourTableName MODIFY youColumName type CHARACTER SET anyCharcaterSetName;You can use character set name utf8 or something elsE. To set column charset, let us first create a table. The query to create a table is as follows −mysql> ... Read More
Rishi Rathor
1K+ Views
We will see here how to display all tables inside a MySQL database using Java. You can use show command from MySQL to get all tables inside a MySQL database.Let’s say our database is ‘test’. The Java code is as follows to show all table names inside a database ‘test’.The ... Read More
Rishi Rathor
3K+ Views
To add days to a date, you can use DATE_ADD() function from MySQL. The syntax is as follows to add days to a date −INSERT INTO yourTableName VALUES(DATE_ADD(now(), interval n day));In the above syntax, you can use curdate() instead of now(). The curdate() will store only date while now() will ... Read More
Rishi Rathor
3K+ Views
To display the value of a variable, you can use select statement. The syntax is follows −SELECT @yourVariableName;Let us first create a variable. This can be done using SET command. The following is the syntax to create a variable −SET @yourVariableName = yourValue;Let us check the above syntax to create ... Read More
Rishi Rathor
7K+ Views
You can use in-built function UPPER() from MySQL to change a lower case to upper case. The syntax is as follows with select statement.SELECT UPPER(‘yourStringValue’);The following is an example showing string in lower case −mysql> select upper('john');Here is the output displaying string in upper case −+---------------+ | upper('john') | +---------------+ ... Read More
Rishi Rathor
6K+ Views
The Sum() is an aggregate function in MySQL. You can use sum query with if condition. To understand the sum query with if condition, let us create a table.The query to create a table −mysql> create table SumWithIfCondition −> ( −> ModeOfPayment varchar(100) −> , −> ... Read More
Rishi Rathor
913 Views
To adjust display settings of MySQL command line, use the /G at the end of MySQL queries instead of semicolon(;).The syntax is as follows −SELECT *FROM yourTableName \GThe above syntax adjusts the display settings. Here we will display records in row format from our sample ‘studenttable’ table which we created ... Read More
Rishi Rathor
161 Views
Google Analytics is a freemium analytic tool that provides a detailed statistics of the web traffic. It is used by more than 60% of website owners. Analytics Tools offer an insight into the performance of your website, visitors’ behavior, and data flow. These tools are inexpensive and easy to use. ... Read More
Rishi Rathor
154 Views
For responsive design, you do not have to use user-scalable=no. Use it only if you want your application to look more like a native app.Zooming is a key feature for accessibility and you need to keep that in mind. You can control that users won't break your design if they ... Read More
To Continue Learning Please Login
Login with Google