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
3K+ Views
To insert in a table in stored procedure, the syntax is as follows −create procedure yourProcedureName(OptionalParameter) begin insert into yourTableName() values(yourValue1, yourValue2, ...N); endTo understand the above syntax, let us first create a table −mysql> create table DemoTable1928 ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, ... Read More
AmitDiwan
526 Views
The coalesce() can be used to print first NOT NULL column value. Let us first create a table −mysql> create table DemoTable1927 ( StudentName varchar(20), StudentSubject varchar(20) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into ... Read More
AmitDiwan
146 Views
To traverse and find descendants of an element, jQuery has the following methods: children() and find().children() methodThe childreb() method in jQuery is used to return the direct children of the selected element (only a single level of direct children). Let us see an example−Example Live Demo div { ... Read More
AmitDiwan
141 Views
For this, you can use ORDER BY CASE statement. Let us create a table −mysql> create table DemoTable1926 ( Position varchar(20), Number int ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1926 values('Highest', 50); Query ... Read More
AmitDiwan
168 Views
For this, use UPDATE command along with CASE statement. Let us first create a table −mysql> create table DemoTable1925 ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentName varchar(20), StudentMarks int ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using ... Read More
AmitDiwan
166 Views
To update records with a specific year, use the YEAR() method as in the below syntax:update yourTableName set yourColumnName1=yourValue1 where YEAR(str_to_date(yourColumnName2, '%d/%m/%Y'))=yourValue2;Let us first create a table −mysql> create table DemoTable1924 ( UserName varchar(20), UserJoiningDate varchar(40) ); Query OK, 0 rows affected (0.00 sec)Insert some records ... Read More
AmitDiwan
439 Views
The mouseup() method in jQuery is used to trigger the mouseup event. The event occurs when the left mouse button is releases over the selected element.SyntaxThe syntax is as follows−$(selector).mousedown(func)Above, func is the function to run when mouseup event triggers.ExampleLet us now see an example to implement the jQuery mouseup() ... Read More
AmitDiwan
1K+ Views
Let us create a table −mysql> create table DemoTable1923 ( UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserName varchar(20) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1923(UserId, UserName) select 101 as UserId, ... Read More
AmitDiwan
250 Views
Let us create a table −mysql> create table DemoTable1922 ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentName varchar(20) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1922(StudentName) values('Chris'); Query OK, 1 row affected (0.00 ... Read More
AmitDiwan
188 Views
For random rows, you can use RAND(), whereas to fix a specific column, use ORDER BY clause. Let us create a table −mysql> create table DemoTable1921 ( Number int ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert ... Read More