
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
AmitDiwan has Published 10744 Articles

AmitDiwan
1K+ Views
For this, you can use the UPDATE command along with the WHERE clause in a PROCEDURE. Let us first create a table −mysql> create table DemoTable -> ( -> Id int, -> FirstName varchar(20), -> LastName varchar(20) -> ); Query OK, 0 rows affected (0.56 ... Read More

AmitDiwan
362 Views
The find() method of JavaScript is used to return the first elements value in an array, if the condition is passed, otherwise the return value is undefined. The syntax is as follows −array.find(function(val, index, arr), thisValue)Here, function is a function with val, which is the value of the current element. ... Read More

AmitDiwan
277 Views
If we will insert nothing in the INSERT statement, then for timestamp type, it would insert the current date-time. Let us first create a table −mysql> create table DemoTable -> ( -> UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> UserLoginDate timestamp default current_timestamp -> ); ... Read More

AmitDiwan
157 Views
Let us first create a table −mysql> create table DemoTable -> ( -> Value varchar(20) -> ); Query OK, 0 rows affected (0.53 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('20'); Query OK, 1 row affected (0.14 sec) mysql> insert into ... Read More

AmitDiwan
238 Views
Use the STR_TO_DATE() method to insert date records as in the below syntax −select str_to_date(yourColumnName, '%b %Y') from yourTableName;Let us first create a table −mysql> create table DemoTable -> ( -> JoiningYear varchar(20) -> ); Query OK, 0 rows affected (0.69 sec)Insert some records in the table ... Read More

AmitDiwan
129 Views
Let us first create a table −mysql> create table DemoTable -> ( -> Version varchar(20) -> ); Query OK, 0 rows affected (0.77 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('1.0.0'); Query OK, 1 row affected (0.21 sec) mysql> insert into ... Read More

AmitDiwan
263 Views
Use FORMAT() in MySQL to display currency records and display them in the correct form. Let us first create a table −mysql> create table DemoTable -> ( -> Amount DECIMAL(15, 4) -> ); Query OK, 0 rows affected (0.75 sec)Insert some records in the table using insert ... Read More

AmitDiwan
84 Views
For this, use LEFT in MySQL. Let us first create a table −mysql> create table DemoTable -> ( -> Title text -> ); Query OK, 0 rows affected (0.59 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Java database connectivity to MySQL ... Read More

AmitDiwan
245 Views
For this, use CASE statement along with FIND_IN_SET(). Let us first create a table −mysql> create table DemoTable1629 -> ( -> Month varchar(100) -> ); Query OK, 0 rows affected (0.64 sec)Insert some records in the table using insert command.mysql> insert into DemoTable1629 values('2, ... Read More

AmitDiwan
797 Views
To set default, you can use the DEFAULT keyword in MySQL. Let us first create a table −mysql> create table DemoTable -> ( -> EmployeeId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> EmployeeName varchar(20), -> EmployeeJoiningDate datetime default '0000-00-00 00:00:00' -> )ENGINE=MyISAM, AUTO_INCREMENT=100; Query OK, ... Read More