- 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
Jennifer Nicholas has Published 332 Articles
Jennifer Nicholas
737 Views
To insert the current date (not time), then you can use in-built function CURDATE() from MySQL. The syntax is as follows −INSERT INTO yourTableName values(curdate());Or if you want to add date and time both then you can use the in-built function NOW() from MySQL. The syntax is as follows −INSERT ... Read More
Jennifer Nicholas
7K+ Views
To concatenate two columns, use CONCAT() function in MySQL. The syntax is as follows −select CONCAT(yourColumnName1, ' ', yourColumnName2) as anyVariableName from yourTableName;To understand the above concept, let us create a table. The query to create a table is as follows −mysql> create table concatenateTwoColumnsDemo −> ( −> ... Read More
Jennifer Nicholas
5K+ Views
You can bulk update MySQL data with one query using CASE command. The syntax is as follows −update yourTableName set yourUpdateColumnName = ( Case yourConditionColumnName WHEN Value1 THEN ‘’UpdatedValue’ WHEN Value2 THEN ‘UpdatedValue’ . . N END) where yourConditionColumnName IN(Value1, Value2, .....N);To understand the above concept, let us create a ... Read More
Jennifer Nicholas
108 Views
Use the IS NOT NULL operator to compare with NULL values. The syntax is as follows −SELECT *FROM yourTableName where yourColumnName1 is not null or yourColumnName2 anyIntegerValue;To check the not equal to in presence of null, let us create a table. The query to create a table is as ... Read More
Jennifer Nicholas
285 Views
You can update MySQL with IF condition as well as CASE statement. For this purpose, let us first create a table. The query to create a table −mysql> create table UpdateWithIfCondition −> ( −> BookId int, −> BookName varchar(200) −> ); Query OK, 0 rows affected ... Read More
Jennifer Nicholas
1K+ Views
To get average on time column, use the below syntax. It will give the average in time format −SELECT SEC_TO_TIME(AVG(TIME_TO_SEC(yourColumnName))) as anyVariableName from yourTableName;To understand the above concept, let us create a table. The following is the query −mysql> create table AverageOnTime −> ( −> PunchInTime time ... Read More
Jennifer Nicholas
534 Views
Let us first create a table to increase and adecrease row value by 1. The following is the query −mysql> create table IncrementAndDecrementValue −> ( −> UserId int, −> UserScores int −> ); Query OK, 0 rows affected (0.60 sec)Insert some records in the table using ... Read More
Jennifer Nicholas
175 Views
You can use in-built function UNIX_TIMESTAMP() from MySQL to get the timestamps and the difference between two timestamps. The syntax is as follows −SELECT UNIX_TIMESTAMP(yourColumnName1) - UNIX_TIMESTAMP(yourColumnName2) as anyVariableName from yourTableName;To understand the above concept, let us create a table. The following is the query to create a table −mysql> ... Read More
Jennifer Nicholas
328 Views
Whenever a mobile website is created and there is a requirement in which user is requested for current position on button click, then HTML5 geolocation is used.This is working fine in mobile chrome.However when in Mobile Safari, the user is prompted to share location and browser defaults to geolocation then ... Read More
Jennifer Nicholas
79 Views
Web Messaging is the way for documents to separates browsing context to share the data without Dom. It overrides the cross-domain communication problem in different domains, protocols or ports.For example, you want to send the data from your page to ad container, which is placed at iframe, or voice-versa, in ... Read More
To Continue Learning Please Login
Login with Google