AmitDiwan has Published 10744 Articles

Combine SUM and FORMAT in MySQL to format the result

AmitDiwan

AmitDiwan

Updated on 31-Dec-2019 06:48:29

2K+ Views

Let us create a table −mysql> create table DemoTable1950    (    Amount float    ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1950 values(45.60); Query OK, 1 row affected (0.00 sec) mysql> insert into DemoTable1950 values(101.78); Query OK, ... Read More

Set NOT NULL attribute to an existing column in MySQL

AmitDiwan

AmitDiwan

Updated on 31-Dec-2019 06:47:21

300 Views

To set NOT NULL attribute to an existing column, use ALTER TABLE command. Let us first create a table −mysql> create table DemoTable1949    (    UserId int,    UserName varchar(20)    ); Query OK, 0 rows affected (0.00 sec)Here is the query to set NOT NULL attribute to an ... Read More

jQuery slideUp() with Examples

AmitDiwan

AmitDiwan

Updated on 31-Dec-2019 06:46:20

288 Views

The slideUp() method in jQuery is used to slide up the selected element i.e. to hide them.SyntaxThe syntax is as follows −$(selector).slideUp(speed, easing, callback)Above, the parameter speed is the speed of the slide effect. Here, easing is the speed of the element in different points of the animation, whereas callback ... Read More

Sort only numbers from alphanumeric string in MySQL?

AmitDiwan

AmitDiwan

Updated on 31-Dec-2019 06:45:01

323 Views

To sort only numbers from alphanumeric string, use ORDER BY RIGHT(). Let us first create a table −mysql> create table DemoTable1948    (    StudentCode varchar(20)    ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1948 values('121John_567'); Query OK, ... Read More

jQuery parent > child Selector

AmitDiwan

AmitDiwan

Updated on 31-Dec-2019 06:42:36

994 Views

The parent > child selector in jQuery is used to select all elements that are a direct child of the specified element.SyntaxThe syntax is as follows −("parent > child")ExampleLet us now see an example to implement the jQuery parent > child selector − Live Demo    $(document).ready(function(){   ... Read More

MySQL SELECT from a subquery and then perform DELETE?

AmitDiwan

AmitDiwan

Updated on 31-Dec-2019 06:41:19

1K+ Views

Let us first create a table −mysql> create table DemoTable1947    (    Id int,    Name varchar(20)    ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1947 values(101, 'Chris'); Query OK, 1 row affected (0.00 sec) mysql> insert ... Read More

jQuery siblings() with Examples

AmitDiwan

AmitDiwan

Updated on 31-Dec-2019 06:38:51

219 Views

The siblings() method in jQuery is used to return all sibling elements of the selected element.SyntaxThe syntax is as follows −$(selector).siblings(filter)Above, the filter specifies a selector expression to narrow down the search for sibling elements.Let us now see an example to implement the jQuery siblings() method −Example Live Demo ... Read More

Fetch the count of a specific date in a MySQL table

AmitDiwan

AmitDiwan

Updated on 31-Dec-2019 06:37:27

521 Views

Let us first create a table −mysql> create table DemoTable1946    (    ShippingDate date    ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1946 values('2019-12-11'); Query OK, 1 row affected (0.00 sec) mysql> insert into DemoTable1946 values('2018-12-11'); Query ... Read More

jQuery stop() with Examples

AmitDiwan

AmitDiwan

Updated on 31-Dec-2019 06:35:24

246 Views

The stop() method in jQuery is used to stop an animation before it ends.SyntaxThe syntax is as follows −$(selector).stop(stopAll, goToEnd);Above, stopAll clears all animation, whereas gotoEnd is used to specify whether to complete the current animation immediately or not.ExampleLet us now see an example to implement the jQuery stop() method − Live ... Read More

Insert records from multiple tables in MySQL

AmitDiwan

AmitDiwan

Updated on 31-Dec-2019 06:31:50

5K+ Views

To insert records from multiple tables, use INSERT INTO SELECT statement. Here, we will insert records from 2 tables.Let us first create a table −mysql> create table DemoTable1943    (    Name varchar(20)    ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command ... Read More

Advertisements