
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
627 Views
The data() method in jQuery is used to attach data to or gets data from selected elements.SyntaxThe syntax is as follows −$(selector).data(name) $(selector).data(name, value)Above, the name is the name of data to retrieve for the 1st syntax.For the 2nd syntax, the name is the name of data to set, whereas ... Read More

AmitDiwan
532 Views
For this, you can use UNION ALL. Let us first create a table −mysql> create table DemoTable1987 ( UserValue int ); Query OK, 0 rows affected (2.90 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1987 values(4); Query OK, 1 row affected (0.22 ... Read More

AmitDiwan
117 Views
For this, you can use IN() along with ORDER BY clause. Let us first create a table −mysql> create table DemoTable1986 ( Number int ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1986 values(50); Query OK, ... Read More

AmitDiwan
273 Views
The index() method in jQuery is used to return the index position of specified elements relative to other specified elements.SyntaxThe syntax is as follows −$(selector).index()ExampleLet us now see an example to implement the jQuery index() method − Live Demo $(document).ready(function(){ $("li").click(function(){ ... Read More

AmitDiwan
200 Views
For this, use STR_TO_DATE() along with DATE_FORMAT(). Let us first create a table −mysql> create table DemoTable1985 ( DueDate varchar(20) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1985 values('Jan 2017'); Query OK, 1 row affected ... Read More

AmitDiwan
296 Views
The toggleClass() method in jQuery is used to toggle between adding or removing one or more classes from selected elements.SyntaxThe syntax is as follows −$(selector).toggleClass(classname, func(index, currentclass), switch)Above, class name specifies one or more class names to add or remove, whereas func is a function that returns one or more ... Read More

AmitDiwan
705 Views
Let’s say you need to change the date and add years. For this, use UPDATE command along with DATE_ADD(). Let us first create a table −mysql> create table DemoTable1984 ( ShippingDate date ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert ... Read More

AmitDiwan
296 Views
To insert a row like this use the following syntax, wherein we are using CURRENT_TIMESTAMP −insert into yourTableName values(CURRENT_TIMESTAMP - INTERVAL ABS(RAND() * 100) DAY);To understand the above syntax, let us create a table −mysql> create table DemoTable1983 ( DueDate timestamp ); Query OK, 0 rows affected ... Read More

AmitDiwan
144 Views
The removeData() method in jQuery is used to remove the data set with the data() method.SyntaxThe syntax is as follows −$(selector).removeData(name)Above, the name parameter is used to specify the name of the data to remove.ExampleLet us now see an example to implement the jQuery removeData() method − Live Demo ... Read More

AmitDiwan
350 Views
Let us first create a table −mysql> create table DemoTable1982 ( StudentId int , StudentName varchar(20), StudentAge int ); Query OK, 0 rows affected (0.00 sec)Let us check the table engine type -mysql> show create table DemoTable1982;This will produce the following output −+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ... Read More