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 10740 Articles
AmitDiwan
225 Views
The height() method in jQuery is used to set or return the height of the selected elements. It does not include padding, border, or margin.SyntaxThe syntax is as follows −$(selector).height() $(selector).height(val)Above, Val in the 2nd syntax is used to specify the height in px, em, pt, etc.ExampleLet us now see ... Read More
AmitDiwan
198 Views
The outerWidth() method in jQuery is used to return the width of an element. The method includes padding and border.OutputThe syntax is as follows−$(selector).outerWidth(margin)Above, the margin is a Boolean value to specify whether or not to include the margin. TRUE is to include the margin.ExampleLet us now see an example ... Read More
AmitDiwan
251 Views
The outerHeight() method in jQuery is used to return the height of an element. The method includes padding and border.SyntaxThe syntax is as follows−$(selector).outerHeight(margin)Above, the margin is a Boolean value to specify whether or not to include the margin. TRUE is to include the margin.ExampleLet us now see an example ... Read More
AmitDiwan
182 Views
The param() method in jQuery is used to create a serialized representation of an array or object.SyntaxThe syntax is as follows −$.param(obj, val)Above, obj is the object to serialize, whereas Val specifies whether or not to use the traditional style of param serialization.ExampleLet us now see an example to implement ... Read More
AmitDiwan
231 Views
The last() method in jQuery is used to return the last element of the selected elements.SyntaxThe syntax is as follows −$(selector).last()ExampleLet us now see an example to implement the jQuery last() method − Live Demo $(document).ready(function(){ $("div p").last().css("color", "orange"); }); ... Read More
AmitDiwan
2K+ Views
To return the field with highest count, use ORDER BY COUNT(*). Let us first create a table −mysql> create table DemoTable1940 ( FirstName varchar(20) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1940 values('Chris'); Query OK, ... Read More
AmitDiwan
312 Views
For this, you can use LEFT(). Let us first create a table −mysql> create table DemoTable1939 ( FullName varchar(20) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1939 values('Adam Smith'); Query OK, 1 row affected (0.00 ... Read More
AmitDiwan
1K+ Views
To display all fields, set the database with table_schema and specific table with table_name as in the below syntax −select column_name as anyAliasName from information_schema.columns where table_schema=database() and table_name=’yourTableName’\GLet us first create a table −mysql> create table DemoTable1938 ( StudentId int, StudentName varchar(20), StudentAge ... Read More
AmitDiwan
591 Views
For this, use CASE statement with ORDER BY. Let us first create a table −mysql> create table DemoTable1937 ( Name varchar(20) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1937 values('Chris'); Query OK, 1 row affected ... Read More
AmitDiwan
3K+ Views
To perform multiple inserts, the syntax is as follows −insert into yourTableName(yourColumnName1, yourColumnName2, yourColumnName3, ..N) select yourValue1 as yourColumnName1, yourValue2 as yourColumnName2, yourValue3 as yourColumnName3, ......N union select yourValue1 as yourColumnName1, yourValue2 as yourColumnName2, yourValue3 as yourColumnName3, ......N . . NTo understand the above syntax, let us ... Read More