Showing posts with label Mysql. Show all posts
Showing posts with label Mysql. Show all posts

Monday, 29 July 2019

MySQL stored procedure parameters IN OUT INOUT | How to use parameters in MySQL procedure

                   In this post, we will see MySQL stored procedure parameters IN OUT INOUT.
                   In last post https://www.comrevo.com/2019/07/how-to-create-procedure-in-mysql-database.html, we have seen how to create procedure in MySQL. In this post, we will see how to use parameters in procedure.

For Details, Watch Following Video:

Thursday, 25 July 2019

Java MySQL CallableStatement Example | Java MySQL Call Stored Procedure Example ( Callable Statement )


                      In this post, we will see Java MySQL CallableStatement Example OR Java MySQL Call Stored Procedure Example ( Callable Statement ).

How to create procedure in MySQL database?

                 In this post, we will see how to create procedure in MySQL database. 
             
What is the need of procedure?

1. By creating procedure, we can run multiple SQL queries in a single call. 

2. Another advantage is that procedure is stored and can be called at any time. No need to write same SQL queries again and again. 

For Demonstration, watch following video:

Watch on YouTube: https://www.youtube.com/watch?v=02clWrruoKE

                 Check following example:

Java MySQL Insert Example using Prepared Statement

                      In this post, we will see Java MySQL Insert Example using Prepared Statement.

                In previous post https://www.comrevo.com/2017/07/jdbc-code-to-insert-data-into-mysql-database.html, we have seen how to insert records (rows) into MySQL database. Here, we will see how to use PreparedStatement. 

For details, watch following video:

Watch on YouTube: https://www.youtube.com/watch?v=S6mJpp5Dg7c

What is the need of Prepared Statement?:
               Sometimes we need to implement same query multiple times e.g. insert query to add multiple records into table. In this situation, only data get changed while the syntax for SQL query remains same. Here, unnecessarily we compile the same query multiple times. To avoid this, we have to use PreparedStatement.

What is PreparedStatement?
               PreparedStatement is an Interface. Stament interface is extended in PreparedStament interface.

               Here sdldb is the database name. User name is sdl and password is sdl123. This program is for inserting records (rows) into MySQL database table student.
              

Tuesday, 16 July 2019

Solution for Mysql error: access denied for user 'root'@'localhost'

                  In this post, we will see solution for the mysql error access denied for user 'root'@'localhost'. 

Tuesday, 3 January 2017

How to insert and retrieve image from mysql database in jsp

                        In this post, we will see how to insert and retrieve image from mysql database in jsp.
                        Here, frontend and backend programs are in JSP while database used is Mysql. Database name is "test", Database user name is also "test" and password is "123". Table name in which I have inserted image here, is "biodata". Table's configuration is shown in following screenshot:


Saturday, 26 December 2015

Mysql Tutorial - Basic SQL Queries

               In this post (tutorial), we will see basic sql queries which we need for database (e.g. Mysql) operations.