gdata.io.handleScriptLoaded({"version":"1.0","encoding":"UTF-8","feed":{"xmlns":"http://www.w3.org/2005/Atom","xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/","xmlns$gd":"http://schemas.google.com/g/2005","xmlns$georss":"http://www.georss.org/georss","xmlns$thr":"http://purl.org/syndication/thread/1.0","xmlns$blogger":"http://schemas.google.com/blogger/2008","id":{"$t":"tag:blogger.com,1999:blog-913600556879440043"},"updated":{"$t":"2024-01-01T15:38:08.302+05:30"},"category":[{"term":"Data Structures"},{"term":"Vedic Mathematics"},{"term":"My Vlogs"},{"term":"Website Designing"},{"term":"Guest Blogging"},{"term":"Youtube"},{"term":"PPL"},{"term":"Android"},{"term":"Android App Development"},{"term":"High Performance Computing"},{"term":"Socket Programming"},{"term":"Java"},{"term":"Cloud Computing"},{"term":"Unboxing \u0026 Review"},{"term":"Database"},{"term":"OpenMPI"},{"term":"OPENCL"},{"term":"CUDA"},{"term":"LEX \u0026 YACC"},{"term":"Vocabulary"},{"term":"Compiler"},{"term":"Blogging Tips"},{"term":"Networking"},{"term":"Linux"},{"term":"Nanded City Pune"},{"term":"Parallel Computing"},{"term":"SDL"},{"term":"Fedora"},{"term":"Udemy Courses"},{"term":"Dia Software"},{"term":"MPI"},{"term":"Multithreading"},{"term":"Computer Networks"},{"term":"Abbreviations in Computer Science"},{"term":"Salesforce"},{"term":"Lisp"},{"term":"YouTube Tips"},{"term":"MS Excel Formulas \u0026 Functions"},{"term":"C Plus Plus Programming"},{"term":"GATE"},{"term":"Mysql"},{"term":"Google Forms"},{"term":"Wine"},{"term":"Swing"},{"term":"Mathematics"},{"term":"SQL"},{"term":"Amazon Links Summary"},{"term":"Thread Pool"},{"term":"General"},{"term":"Amazon Affiliate Program"},{"term":"How To Write Blog"},{"term":"C Programming"},{"term":"Applet"},{"term":"Selenium Automation Testing"},{"term":"Skill Development Lab"},{"term":"OPENMP"},{"term":"Python"},{"term":"Ubuntu"}],"title":{"type":"text","$t":"Computer Revolution (www.comrevo.com)"},"subtitle":{"type":"html","$t":""},"link":[{"rel":"http://schemas.google.com/g/2005#feed","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/-/Database?alt\u003djson-in-script\u0026max-results\u003d6"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/-/Database?alt\u003djson-in-script\u0026max-results\u003d6"},{"rel":"alternate","type":"text/html","href":"http://www.comrevo.com/search/label/Database"},{"rel":"hub","href":"http://pubsubhubbub.appspot.com/"},{"rel":"next","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/-/Database/-/Database?alt\u003djson-in-script\u0026start-index\u003d7\u0026max-results\u003d6"}],"author":[{"name":{"$t":"Parag Jambhulkar"},"uri":{"$t":"https://www.blogger.com/profile/13991750622483538113"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"35","height":"35","src":"//www.blogger.com/img/blogger_logo_round_35.png"}}],"generator":{"version":"7.00","uri":"https://www.blogger.com","$t":"Blogger"},"openSearch$totalResults":{"$t":"17"},"openSearch$startIndex":{"$t":"1"},"openSearch$itemsPerPage":{"$t":"6"},"entry":[{"id":{"$t":"tag:blogger.com,1999:blog-913600556879440043.post-7007112937468221678"},"published":{"$t":"2019-07-29T11:03:00.001+05:30"},"updated":{"$t":"2020-09-25T11:26:30.569+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Database"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Java"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Skill Development Lab"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Mysql"}],"title":{"type":"text","$t":"MySQL stored procedure parameters IN OUT INOUT | How to use parameters in MySQL procedure"},"content":{"type":"html","$t":"\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; In this post, we will see MySQL stored procedure parameters IN OUT INOUT.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; In last post\u0026nbsp;\u003ca href\u003d\"https://www.comrevo.com/2019/07/how-to-create-procedure-in-mysql-database.html\" target\u003d\"_blank\"\u003ehttps://www.comrevo.com/2019/07/how-to-create-procedure-in-mysql-database.html\u003c/a\u003e, we have seen how to create procedure in MySQL. In this post, we will see how to use parameters in procedure.\u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eFor Details, Watch Following Video:\u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\n  \n  \n  \u003ciframe width\u003d\"640\" height\u003d\"360\" src\u003d\"https://www.youtube.com/embed/dBgkCGu7njI\" frameborder\u003d\"0\" allow\u003d\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen\u003e\u003c/iframe\u003e\n  \n  \n  \n  \u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eWatch on YouTube:\u0026nbsp;\u003ca href\u003d\"https://www.youtube.com/watch?v\u003ddBgkCGu7njI\" target\u003d\"_blank\"\u003ehttps://www.youtube.com/watch?v\u003ddBgkCGu7njI\u003c/a\u003e\u003cbr /\u003e\u003c/b\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003ca name\u003d'more'\u003e\u003c/a\u003e\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003eWhat is the advantage of having parameters in SQL Procedure?\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; By \u003c/span\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eusing parameters IN, OUT, INOUT we can send values and also receive results from procedure.\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cdiv style\u003d\"text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e1. IN\u003c/b\u003e\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; It is used to declare input parameters in procedure. \u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eSyntax:\u003c/span\u003e\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003ecreate procedure procedure_name(IN parameter_name data_type(size))\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003ebegin\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eSQL Queries\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eend\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eFor Example:\u003c/b\u003e\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e(Creating procedure)\u003c/u\u003e\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003emysql\u0026gt; delimiter //\u003cbr /\u003emysql\u0026gt; create procedure sample(IN city_proc varchar(10))\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; begin \u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; select * from student where city\u003dcity_proc;\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; end//\u003cbr /\u003eQuery OK, 0 rows affected (0.02 sec)\u003cbr /\u003e\u003cbr /\u003emysql\u0026gt; delimiter ;\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cu\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e(Calling procedure)\u003c/span\u003e\u003c/span\u003e\u003c/u\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003emysql\u0026gt; call sample('Pune');\u003cbr /\u003e+--------+-------+---------+------+\u003cbr /\u003e| rollno | class | college | city |\u003cbr /\u003e+--------+-------+---------+------+\u003cbr /\u003e|\u0026nbsp;\u0026nbsp; 1221 | SE\u0026nbsp;\u0026nbsp;\u0026nbsp; | PICT\u0026nbsp;\u0026nbsp;\u0026nbsp; | Pune |\u003cbr /\u003e|\u0026nbsp;\u0026nbsp; 3201 | te\u0026nbsp;\u0026nbsp;\u0026nbsp; | coep\u0026nbsp;\u0026nbsp;\u0026nbsp; | Pune |\u003cbr /\u003e|\u0026nbsp;\u0026nbsp; 2301 | SE\u0026nbsp;\u0026nbsp;\u0026nbsp; | COEP\u0026nbsp;\u0026nbsp;\u0026nbsp; | Pune |\u003cbr /\u003e+--------+-------+---------+------+\u003cbr /\u003e3 rows in set (0.03 sec)\u003cbr /\u003e\u003cbr /\u003eQuery OK, 0 rows affected (0.06 sec)\u003cbr /\u003e\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cdiv style\u003d\"text-align: center;\"\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e2. OUT\u003c/span\u003e\u003c/span\u003e\u003c/b\u003e\u003c/div\u003e\n\u003cdiv style\u003d\"text-align: left;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; It is used to declare output variable in procedure.\u003c/span\u003e\u003c/span\u003e\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e \u003c/span\u003e\u003c/span\u003e\u003c/b\u003e\u003c/div\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eSyntax:\u003c/span\u003e\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003ecreate procedure procedure_name(OUT parameter_name data_type(size))\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003ebegin\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eSQL Queries\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eend\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eFor Example:\u003c/span\u003e\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cu\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e(Creating Procedure)\u003c/span\u003e\u003c/span\u003e\u003c/u\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003emysql\u0026gt; delimiter //\u003cbr /\u003emysql\u0026gt; create procedure sample(IN city_proc varchar(10), OUT total int(10))\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; begin\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; select count(*) into total from student where city\u003dcity_proc;\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; end//\u003cbr /\u003eQuery OK, 0 rows affected (0.00 sec)\u003cbr /\u003e\u003cbr /\u003emysql\u0026gt; delimiter ;\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cu\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/span\u003e\u003c/u\u003e\n\u003cu\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e(Calling Procedure)\u003c/span\u003e\u003c/span\u003e\u003c/u\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003emysql\u0026gt; call sample('Pune', @total);\u003cbr /\u003eQuery OK, 1 row affected (0.00 sec)\u003cbr /\u003e\u003cbr /\u003emysql\u0026gt; select @total;\u003cbr /\u003e+--------+\u003cbr /\u003e| @total |\u003cbr /\u003e+--------+\u003cbr /\u003e|\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; 3 |\u003cbr /\u003e+--------+\u003cbr /\u003e1 row in set (0.00 sec)\u003cbr /\u003e\u003cbr /\u003emysql\u0026gt; select @total AS Num_of_records;\u003cbr /\u003e+----------------+\u003cbr /\u003e| Num_of_records |\u003cbr /\u003e+----------------+\u003cbr /\u003e|\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; 3 |\u003cbr /\u003e+----------------+\u003cbr /\u003e1 row in set (0.00 sec)\u003c/span\u003e\u003c/span\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/b\u003e\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cdiv style\u003d\"text-align: center;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e3. INOUT\u003c/b\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003c/b\u003eIt is used to declare parameter which can be used as input as well as outout parameter.\u003cbr /\u003e\u003cb\u003e\u003c/b\u003e\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eSyntax:\u003c/span\u003e\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003ecreate procedure procedure_name(INOUT parameter_name data_type(size))\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003ebegin\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eSQL Queries\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eend\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eFor Example:\u003c/span\u003e\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cu\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e(Creating Procedure)\u003c/span\u003e\u003c/span\u003e\u003c/u\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003emysql\u0026gt; delimiter //\u003cbr /\u003emysql\u0026gt; create procedure sample(INOUT num int(10))\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; begin\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; select count(*) into num from student where rollno\u003dnum;\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; end//\u003cbr /\u003eQuery OK, 0 rows affected (0.00 sec)\u003cbr /\u003e\u003cbr /\u003emysql\u0026gt; delimiter ;\u003cbr /\u003e\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cu\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e(Calling Procedure)\u003c/span\u003e\u003c/span\u003e\u003c/u\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003emysql\u0026gt; set @num\u003d3303;\u003cbr /\u003eQuery OK, 0 rows affected (0.00 sec)\u003cbr /\u003e\u003cbr /\u003emysql\u0026gt; call sample(@num);\u003cbr /\u003eQuery OK, 1 row affected (0.01 sec)\u003cbr /\u003e\u003cbr /\u003emysql\u0026gt; select @num;\u003cbr /\u003e+------+\u003cbr /\u003e| @num |\u003cbr /\u003e+------+\u003cbr /\u003e|\u0026nbsp;\u0026nbsp;\u0026nbsp; 2 |\u003cbr /\u003e+------+\u003cbr /\u003e1 row in set (0.00 sec)\u003cbr /\u003e\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; Thank You.\u003c/span\u003e \u003c/span\u003e\u003c/div\u003e\n"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https://www.comrevo.com/feeds/7007112937468221678/comments/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https://www.comrevo.com/2019/07/mysql-stored-procedure-parameters-in-out-inout.html#comment-form","title":"0 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/7007112937468221678"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/7007112937468221678"},{"rel":"alternate","type":"text/html","href":"https://www.comrevo.com/2019/07/mysql-stored-procedure-parameters-in-out-inout.html","title":"MySQL stored procedure parameters IN OUT INOUT | How to use parameters in MySQL procedure"}],"author":[{"name":{"$t":"Parag Jambhulkar"},"uri":{"$t":"https://www.blogger.com/profile/13991750622483538113"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"35","height":"35","src":"//www.blogger.com/img/blogger_logo_round_35.png"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https://i.ytimg.com/vi/dBgkCGu7njI/default.jpg","height":"72","width":"72"},"thr$total":{"$t":"0"}},{"id":{"$t":"tag:blogger.com,1999:blog-913600556879440043.post-4718996954718911133"},"published":{"$t":"2019-07-25T14:06:00.001+05:30"},"updated":{"$t":"2019-07-29T11:26:47.308+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Database"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Java"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Mysql"}],"title":{"type":"text","$t":"Java MySQL CallableStatement Example | Java MySQL Call Stored Procedure Example ( Callable Statement )"},"content":{"type":"html","$t":"\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u003c/span\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; \u003c/b\u003e\u003cspan style\u003d\"font-size: large;\"\u003eIn this post, we will see Java MySQL CallableStatement Example OR Java MySQL Call Stored Procedure Example ( Callable Statement ).\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003ca name\u003d'more'\u003e\u003c/a\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; In previous posts, we have seen\u0026nbsp;\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e1. How to insert records (rows) into MySQL database:\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003c/b\u003e \u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003ca href\u003d\"https://www.comrevo.com/2017/07/jdbc-code-to-insert-data-into-mysql-database.html\" target\u003d\"_blank\"\u003ehttps://www.comrevo.com/2017/07/jdbc-code-to-insert-data-into-mysql-database.html\u003c/a\u003e\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e2. Java MySQL Insert Example using PreparedStatement:\u003c/span\u003e\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003ca href\u003d\"https://www.comrevo.com/2019/07/java-mysql-insert-example-using-prepared-statement.html\" target\u003d\"_blank\"\u003ehttps://www.comrevo.com/2019/07/java-mysql-insert-example-using-prepared-statement.html\u003c/a\u003e\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; In this post, we will see how to use \u003cb\u003eCallableStatement\u003c/b\u003e. \u003cu\u003eIt is used to run stored procedure from database\u003c/u\u003e.\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; \u003cb\u003eHow to create procedures in MySQL database, check in following post:\u003c/b\u003e\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003ca href\u003d\"https://www.comrevo.com/2019/07/how-to-create-procedure-in-mysql-database.html\" target\u003d\"_blank\"\u003ehttps://www.comrevo.com/2019/07/how-to-create-procedure-in-mysql-database.html\u003c/a\u003e\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eWhat is \u003c/span\u003e\u003c/span\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eCallableStatement?\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; CallableStatement is an Interface. PreparedStatement interface is extended in CallableStatement interface.\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; Check following example. We have already created procedure \u003cb\u003esample()\u003c/b\u003e which has three SQL queries (insert, update and select). You can add any number of queries in procedure. For details, check link\u0026nbsp;\u003ca href\u003d\"https://www.comrevo.com/2019/07/how-to-create-procedure-in-mysql-database.html\" target\u003d\"_blank\"\u003ehttps://www.comrevo.com/2019/07/how-to-create-procedure-in-mysql-database.html\u003c/a\u003e. \u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\n \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; Here \u003cb\u003esdldb\u003c/b\u003e is the database name. User name is \u003cb\u003esdl\u003c/b\u003e and password is \u003cb\u003esdl123\u003c/b\u003e. \u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; \u003c/span\u003e\u003c/div\u003e\n\u003cb style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eProgram (JdbcCS.java):\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003ctable border\u003d\"1\"\u003e\u003ctbody\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cspan style\u003d\"font-size: large;\"\u003eimport java.sql.*;\u003cbr /\u003e\u003cbr /\u003eclass JdbcCS\u003cbr /\u003e{\u003cbr /\u003epublic static void main(String args[]) throws Exception\u003cbr /\u003e{\u003cbr /\u003eClass.forName(\"com.mysql.jdbc.Driver\");\u003cbr /\u003eConnection con\u003dDriverManager.getConnection(\"jdbc:mysql://localhost:3306/sdldb\",\"sdl\",\"sdl123\");\u003cbr /\u003eCallableStatement st\u003dcon.prepareCall(\"call sample()\");\u003cbr /\u003eResultSet rs\u003dst.executeQuery();\u003cbr /\u003ewhile(rs.next())\u003cbr /\u003e{\u003cbr /\u003eSystem.out.print(rs.getString(1)+\" \");\u003cbr /\u003eSystem.out.print(rs.getString(2)+\" \");\u003cbr /\u003eSystem.out.print(rs.getString(3)+\" \");\u003cbr /\u003eSystem.out.print(rs.getString(4)+\" \");\u003cbr /\u003e\u003cbr /\u003eSystem.out.println(\"\\n\");\u003cbr /\u003e}\u003cbr /\u003e\u003cbr /\u003ers.close();\u003cbr /\u003est.close();\u003cbr /\u003econ.close();\u003cbr /\u003e}\u003cbr /\u003e}\u0026nbsp; \u003c/span\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u003c/span\u003e\u003cbr /\u003e\n\u003cdiv dir\u003d\"ltr\" style\u003d\"orphans: auto; text-align: left; text-indent: 0px; widows: 1;\" trbidi\u003d\"on\"\u003e\n\u003cdiv style\u003d\"-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px;\"\u003e\n\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eOutput:\u003c/b\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\n\u003ctable border\u003d\"1\"\u003e\u003ctbody\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cspan style\u003d\"font-size: large;\"\u003eparag@parag-Inspiron-N4010:~/Desktop/programs/jdbc$ javac JdbcCS.java \u003cbr /\u003eparag@parag-Inspiron-N4010:~/Desktop/programs/jdbc$ java JdbcCS\u003cbr /\u003e1221 SE PICT Pune \u003cbr /\u003e\u003cbr /\u003e3221 TE VJTI Mumbai \u003cbr /\u003e\u003cbr /\u003e1201 se vjti mumbai \u003cbr /\u003e\u003cbr /\u003e3201 te coep Pune \u003cbr /\u003e\u003cbr /\u003e4201 be wce Sangli \u003cbr /\u003e\u003cbr /\u003e3303 TE GCOE Aurangabad \u003c/span\u003e\u003cbr /\u003e\n\u003cdiv\u003e\n\u003cbr /\u003e\u003c/div\u003e\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\u003cdiv\u003e\n\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; Hope, it will be helpful for you. Thank You.\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003c/span\u003e\u003cspan style\u003d\"font-family: \u0026quot;times new roman\u0026quot;; font-size: large;\"\u003eCheck jdbc code for fetching data from database in this post:\u0026nbsp;\u003c/span\u003e\u003ca href\u003d\"http://www.comrevo.com/2017/07/jdbc-code-to-retrieve-data-from-mysql-database.html\" style\u003d\"font-family: 'Times New Roman'; font-size: x-large;\" target\u003d\"_blank\"\u003ehttp://www.comrevo.com/2017/07/jdbc-code-to-retrieve-data-from-mysql-database.html\u003c/a\u003e\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv style\u003d\"text-align: center;\"\u003e\n\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\n\u003ccenter\u003e\n\u003ctable border\u003d\"1\"\u003e\u003ctbody\u003e\n\u003ctr\u003e\u003cth\u003e\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003ca href\u003d\"http://www.comrevo.com/2016/09/database.html\" target\u003d\"_blank\"\u003eCheck Other Posts on Database\u003c/a\u003e\u003c/span\u003e\u003c/div\u003e\n\u003c/th\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\u003c/center\u003e\n\u003c/div\u003e\n\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https://www.comrevo.com/feeds/4718996954718911133/comments/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https://www.comrevo.com/2019/07/java-mysql-callablestatement-example-or-java-mysql-call-stored-procedure-example.html#comment-form","title":"0 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/4718996954718911133"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/4718996954718911133"},{"rel":"alternate","type":"text/html","href":"https://www.comrevo.com/2019/07/java-mysql-callablestatement-example-or-java-mysql-call-stored-procedure-example.html","title":"Java MySQL CallableStatement Example | Java MySQL Call Stored Procedure Example ( Callable Statement )"}],"author":[{"name":{"$t":"Parag Jambhulkar"},"uri":{"$t":"https://www.blogger.com/profile/13991750622483538113"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"35","height":"35","src":"//www.blogger.com/img/blogger_logo_round_35.png"}}],"thr$total":{"$t":"0"}},{"id":{"$t":"tag:blogger.com,1999:blog-913600556879440043.post-6559038143277845616"},"published":{"$t":"2019-07-25T12:08:00.002+05:30"},"updated":{"$t":"2020-09-25T10:52:43.697+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Database"},{"scheme":"http://www.blogger.com/atom/ns#","term":"SQL"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Skill Development Lab"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Mysql"}],"title":{"type":"text","$t":"How to create procedure in MySQL database?"},"content":{"type":"html","$t":"\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; In this post, we will see how to create procedure in MySQL database\u003c/span\u003e.\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003eWhat is the need of procedure?\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e1. By creating procedure, we can run multiple SQL queries in a single call.\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e2. Another advantage is that procedure is stored and can be called at any time. No need to write same SQL queries again and again.\u0026nbsp;\u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eFor Demonstration, watch following video:\u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\n  \n  \u003ciframe width\u003d\"640\" height\u003d\"360\" src\u003d\"https://www.youtube.com/embed/02clWrruoKE\" frameborder\u003d\"0\" allow\u003d\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen\u003e\u003c/iframe\u003e\n  \n  \n  \u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eWatch on YouTube:\u0026nbsp;\u003ca href\u003d\"https://www.youtube.com/watch?v\u003d02clWrruoKE\" target\u003d\"_blank\"\u003ehttps://www.youtube.com/watch?v\u003d02clWrruoKE\u003c/a\u003e\u003c/b\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; Check following example:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003ca name\u003d'more'\u003e\u003c/a\u003e\u003cbr /\u003e\n\u003cb style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eProcedure in MySQL:\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003ctable border\u003d\"1\"\u003e\u003ctbody\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cspan style\u003d\"font-size: large;\"\u003emysql\u0026gt; delimiter //\u003cbr /\u003emysql\u0026gt; create procedure sample()\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; begin\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; insert into student values(3303,'TE','GCOE','Amravati');\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; update student set city\u003d'Aurangabad' where college\u003d'GCOE';\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; select * from student;\u003cbr /\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp; -\u0026gt; end//\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003emysql\u0026gt; delimiter ; \u003c/span\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u003c/span\u003e\u003cbr /\u003e\n\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eOutput:\u003c/b\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\n\u003ctable border\u003d\"1\"\u003e\u003ctbody\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cspan style\u003d\"font-size: large;\"\u003emysql\u0026gt; call sample();\u003cbr /\u003e+--------+-------+---------+------------+\u003cbr /\u003e| rollno | class | college | city\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; |\u003cbr /\u003e+--------+-------+---------+------------+\u003cbr /\u003e|\u0026nbsp;\u0026nbsp; 1221 | SE\u0026nbsp;\u0026nbsp;\u0026nbsp; | PICT\u0026nbsp;\u0026nbsp;\u0026nbsp; | Pune\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; |\u003cbr /\u003e|\u0026nbsp;\u0026nbsp; 3221 | TE\u0026nbsp;\u0026nbsp;\u0026nbsp; | VJTI\u0026nbsp;\u0026nbsp;\u0026nbsp; | Mumbai\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; |\u003cbr /\u003e|\u0026nbsp;\u0026nbsp; 1201 | se\u0026nbsp;\u0026nbsp;\u0026nbsp; | vjti\u0026nbsp;\u0026nbsp;\u0026nbsp; | mumbai\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; |\u003cbr /\u003e|\u0026nbsp;\u0026nbsp; 3201 | te\u0026nbsp;\u0026nbsp;\u0026nbsp; | coep\u0026nbsp;\u0026nbsp;\u0026nbsp; | Pune\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; |\u003cbr /\u003e|\u0026nbsp;\u0026nbsp; 4201 | be\u0026nbsp;\u0026nbsp;\u0026nbsp; | wce\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; | Sangli\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; |\u003cbr /\u003e|\u0026nbsp;\u0026nbsp; 2301 | SE\u0026nbsp;\u0026nbsp;\u0026nbsp; | COEP\u0026nbsp;\u0026nbsp;\u0026nbsp; | Pune\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; |\u003cbr /\u003e|\u0026nbsp;\u0026nbsp; 3301 | TE\u0026nbsp;\u0026nbsp;\u0026nbsp; | SGGS\u0026nbsp;\u0026nbsp;\u0026nbsp; | Nanded\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; |\u003cbr /\u003e|\u0026nbsp;\u0026nbsp; 3303 | TE\u0026nbsp;\u0026nbsp;\u0026nbsp; | GCOE\u0026nbsp;\u0026nbsp;\u0026nbsp; | Aurangabad |\u003cbr /\u003e+--------+-------+---------+------------+\u003cbr /\u003e8 rows in set (0.17 sec)\u003cbr /\u003e\u003cbr /\u003eQuery OK, 0 rows affected (0.17 sec)\u003c/span\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\u003cbr /\u003e\n\u003cu\u003e\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003eExplanation\u003c/span\u003e\u003c/b\u003e\u003c/u\u003e\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e:\u0026nbsp;\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; \u003cb\u003edelimiter\u003c/b\u003e command is used to change the end of MySQL Query.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g. Generally end of SQL query is \u003cb\u003e;\u003c/b\u003e . Now, if we want to change it to \u003cb\u003e//\u003c/b\u003e. Then execute \u003cb\u003edelimiter //\u003c/b\u003e. If we want to make end of each sql query as \u003cb\u003e$$\u003c/b\u003e, then execute \u003cb\u003edelimiter $$\u003c/b\u003e.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; In above example, we have to add multiple SQL queries in procedure \u003cb\u003esample()\u003c/b\u003e, hence we have changed the end of SQL query as \u003cb\u003e//\u003c/b\u003e by executing \u003cb\u003edelimiter //\u003c/b\u003e. After defining procedure sample, again we have reset the end of SQL query as \u003cb\u003e;\u003c/b\u003e by executing \u003cb\u003edelimiter ;\u003c/b\u003e .\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003eSyntax for creating procedure in MySQL is as follows:\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ecreate procedure procedure_name\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ebegin\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; SQL Queries;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eend\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003eSyntax for calling procedure is as follows:\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ecall procedure_name();\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003eSyntax for displaying all procedures:\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eshow procedure status;\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003eSyntax for deleting any procedure:\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003edrop procedure procedure_name;\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003eSyntax for getting all options for show command:\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ehelp show; \u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cu\u003e\u003cb\u003eFind how to use parameters IN, OUT, INOUT in MySQL procedure in next \u003c/b\u003e\u003cb\u003epost\u003c/b\u003e\u003c/u\u003e\u0026nbsp; \u003ca href\u003d\"https://www.comrevo.com/2019/07/mysql-stored-procedure-parameters-in-out-inout.html\" target\u003d\"_blank\"\u003ehttps://www.comrevo.com/2019/07/mysql-stored-procedure-parameters-in-out-inout.html\u003c/a\u003e. \u003c/span\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u003c/span\u003e\u003c/div\u003e\n"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https://www.comrevo.com/feeds/6559038143277845616/comments/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https://www.comrevo.com/2019/07/how-to-create-procedure-in-mysql-database.html#comment-form","title":"0 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/6559038143277845616"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/6559038143277845616"},{"rel":"alternate","type":"text/html","href":"https://www.comrevo.com/2019/07/how-to-create-procedure-in-mysql-database.html","title":"How to create procedure in MySQL database?"}],"author":[{"name":{"$t":"Parag Jambhulkar"},"uri":{"$t":"https://www.blogger.com/profile/13991750622483538113"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"35","height":"35","src":"//www.blogger.com/img/blogger_logo_round_35.png"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https://i.ytimg.com/vi/02clWrruoKE/default.jpg","height":"72","width":"72"},"thr$total":{"$t":"0"}},{"id":{"$t":"tag:blogger.com,1999:blog-913600556879440043.post-9192667777190529616"},"published":{"$t":"2019-07-25T11:24:00.003+05:30"},"updated":{"$t":"2020-09-25T11:22:00.114+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Database"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Java"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Skill Development Lab"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Mysql"}],"title":{"type":"text","$t":"Java MySQL Insert Example using Prepared Statement"},"content":{"type":"html","$t":"\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u003c/span\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; \u003c/b\u003e\u003cspan style\u003d\"font-size: large;\"\u003eIn this post, we will see Java MySQL Insert Example using Prepared Statement.\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; In previous post \u003ca href\u003d\"https://www.comrevo.com/2017/07/jdbc-code-to-insert-data-into-mysql-database.html\" target\u003d\"_blank\"\u003ehttps://www.comrevo.com/2017/07/jdbc-code-to-insert-data-into-mysql-database.html\u003c/a\u003e, we have seen how to insert records (rows) into MySQL database. Here, we will see how to use PreparedStatement.\u0026nbsp;\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eFor details, watch following video:\u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\n  \n  \u003ciframe width\u003d\"640\" height\u003d\"360\" src\u003d\"https://www.youtube.com/embed/S6mJpp5Dg7c\" frameborder\u003d\"0\" allow\u003d\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen\u003e\u003c/iframe\u003e\n  \n  \n  \u003c/span\u003e\u003c/div\u003e\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eWatch on YouTube:\u0026nbsp;\u003ca href\u003d\"https://www.youtube.com/watch?v\u003dS6mJpp5Dg7c\" target\u003d\"_blank\"\u003ehttps://www.youtube.com/watch?v\u003dS6mJpp5Dg7c\u003c/a\u003e\u003c/b\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eWhat is the need of Prepared Statement?:\u003c/span\u003e\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; 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.\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/span\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eWhat is \u003c/span\u003e\u003c/span\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003ePreparedStatement?\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; PreparedStatement is an Interface. Stament interface is extended in PreparedStament interface. \u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\n \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; Here \u003cb\u003esdldb\u003c/b\u003e is the database name. User name is \u003cb\u003esdl\u003c/b\u003e and password is \u003cb\u003esdl123\u003c/b\u003e. This program is for inserting records (rows) into MySQL database table \u003cb\u003estudent\u003c/b\u003e.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp; \u003c/span\u003e\u003c/div\u003e\n\u003ca name\u003d'more'\u003e\u003c/a\u003e\u003cb style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003eProgram (JdbcInsertPS.java):\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003ctable border\u003d\"1\"\u003e\u003ctbody\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;import java.sql.*;\u003cbr /\u003e\u003cbr /\u003eclass JdbcInsertPS\u003cbr /\u003e{\u003cbr /\u003epublic static void main(String args[]) throws Exception\u003cbr /\u003e{\u003cbr /\u003eClass.forName(\"com.mysql.jdbc.Driver\");\u003cbr /\u003eConnection con\u003dDriverManager.getConnection(\"jdbc:mysql://localhost:3306/sdldb\",\"sdl\",\"sdl123\");\u003cbr /\u003ePreparedStatement st\u003dcon.prepareStatement(\"insert into student values(?,?,?,?)\");\u003cbr /\u003est.setInt(1,2301);\u003cbr /\u003est.setString(2,\"SE\");\u003cbr /\u003est.setString(3,\"COEP\");\u003cbr /\u003est.setString(4,\"Pune\");\u003cbr /\u003e\u003cbr /\u003eint i\u003dst.executeUpdate();\u003cbr /\u003e\u003cbr /\u003est.setInt(1,3301);\u003cbr /\u003est.setString(2,\"TE\");\u003cbr /\u003est.setString(3,\"SGGS\");\u003cbr /\u003est.setString(4,\"Nanded\");\u003cbr /\u003e\u003cbr /\u003eint j\u003dst.executeUpdate();\u003cbr /\u003e\u003cbr /\u003eResultSet rs\u003dst.executeQuery(\"select * from student\");\u003cbr /\u003ewhile(rs.next())\u003cbr /\u003e{\u003cbr /\u003eSystem.out.print(rs.getString(1)+\" \");\u003cbr /\u003eSystem.out.print(rs.getString(2)+\" \");\u003cbr /\u003eSystem.out.print(rs.getString(3)+\" \");\u003cbr /\u003eSystem.out.print(rs.getString(4)+\" \");\u003cbr /\u003e\u003cbr /\u003eSystem.out.println(\"\\n\");\u003cbr /\u003e}\u003cbr /\u003e\u003cbr /\u003ers.close();\u003cbr /\u003est.close();\u003cbr /\u003econ.close();\u003cbr /\u003e}\u003cbr /\u003e}\u003c/span\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u003c/span\u003e\u003cbr /\u003e\n\u003cdiv dir\u003d\"ltr\" style\u003d\"orphans: auto; text-align: left; text-indent: 0px; widows: 1;\" trbidi\u003d\"on\"\u003e\n\u003cdiv style\u003d\"-webkit-text-stroke-width: 0px; color: black; font-family: \u0026quot;Times New Roman\u0026quot;; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px;\"\u003e\n\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eOutput:\u003c/b\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\n\u003ctable border\u003d\"1\"\u003e\u003ctbody\u003e\n\u003ctr\u003e\u003ctd\u003e\u003cspan style\u003d\"font-size: large;\"\u003eparag@parag-Inspiron-N4010:~/Desktop/programs/jdbc$ javac JdbcInsertPS.java \u003cbr /\u003eparag@parag-Inspiron-N4010:~/Desktop/programs/jdbc$ java JdbcInsertPS\u003cbr /\u003e1221 SE PICT Pune \u003cbr /\u003e\u003cbr /\u003e3221 TE VJTI Mumbai \u003cbr /\u003e\u003cbr /\u003e1201 se vjti mumbai \u003cbr /\u003e\u003cbr /\u003e3201 te coep Pune \u003cbr /\u003e\u003cbr /\u003e4201 be wce Sangli \u003cbr /\u003e\u003cbr /\u003e2301 SE COEP Pune \u003cbr /\u003e\u003cbr /\u003e3301 TE SGGS Nanded \u003c/span\u003e\u003cbr /\u003e\n\u003cdiv\u003e\n\u003cbr /\u003e\u003c/div\u003e\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\u003cdiv\u003e\n\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003c/span\u003e\u003cspan style\u003d\"font-family: \u0026quot;times new roman\u0026quot;; font-size: large;\"\u003eCheck jdbc code for fetching data from database in this post:\u0026nbsp;\u003c/span\u003e\u003ca href\u003d\"http://www.comrevo.com/2017/07/jdbc-code-to-retrieve-data-from-mysql-database.html\" style\u003d\"font-family: \u0026quot;Times New Roman\u0026quot;; font-size: x-large;\" target\u003d\"_blank\"\u003ehttp://www.comrevo.com/2017/07/jdbc-code-to-retrieve-data-from-mysql-database.html\u003c/a\u003e\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv style\u003d\"text-align: center;\"\u003e\n\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\n\u003ccenter\u003e\n\u003ctable border\u003d\"1\"\u003e\u003ctbody\u003e\n\u003ctr\u003e\u003cth\u003e\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003ca href\u003d\"http://www.comrevo.com/2016/09/database.html\" target\u003d\"_blank\"\u003eCheck Other Posts on Database\u003c/a\u003e\u003c/span\u003e\u003c/div\u003e\n\u003c/th\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\u003c/center\u003e\n\u003c/div\u003e\n\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https://www.comrevo.com/feeds/9192667777190529616/comments/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https://www.comrevo.com/2019/07/java-mysql-insert-example-using-prepared-statement.html#comment-form","title":"0 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/9192667777190529616"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/9192667777190529616"},{"rel":"alternate","type":"text/html","href":"https://www.comrevo.com/2019/07/java-mysql-insert-example-using-prepared-statement.html","title":"Java MySQL Insert Example using Prepared Statement"}],"author":[{"name":{"$t":"Parag Jambhulkar"},"uri":{"$t":"https://www.blogger.com/profile/13991750622483538113"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"35","height":"35","src":"//www.blogger.com/img/blogger_logo_round_35.png"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https://i.ytimg.com/vi/S6mJpp5Dg7c/default.jpg","height":"72","width":"72"},"thr$total":{"$t":"0"}},{"id":{"$t":"tag:blogger.com,1999:blog-913600556879440043.post-7747742382264790720"},"published":{"$t":"2019-07-16T14:11:00.000+05:30"},"updated":{"$t":"2019-07-16T14:18:05.815+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Database"},{"scheme":"http://www.blogger.com/atom/ns#","term":"SQL"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Mysql"}],"title":{"type":"text","$t":"Solution for Mysql error: access denied for user 'root'@'localhost' "},"content":{"type":"html","$t":"\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; In this post, we will see solution for the mysql error \u003cb\u003eaccess denied for user 'root'@'localhost'\u003c/b\u003e\u003c/span\u003e.\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003ca name\u003d'more'\u003e\u003c/a\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; After installing Mysql in linux (In Ubuntu, by running command sudo apt-get install mysql-server), when we open mysql by running following command\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003emysql -u root -p\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; We may get error \u003cb\u003emysql access denied for user 'root'@'localhost'\u003c/b\u003e.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; There are many solutions available on net. Best solution I found is as follows:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eRun following command in terminal:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003esudo mysql\u003c/span\u003e\u003c/b\u003e\u003cbr /\u003e\n\u003cb\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\u003c/b\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp; It works for me. Hope it will helpful for you. It changes mysql root password to \u003cb\u003eroot\u003c/b\u003e.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eThanks a lot.\u003c/span\u003e\u003c/div\u003e\n"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https://www.comrevo.com/feeds/7747742382264790720/comments/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https://www.comrevo.com/2019/07/mysql-access-denied-for-user-root-at-localhost.html#comment-form","title":"0 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/7747742382264790720"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/7747742382264790720"},{"rel":"alternate","type":"text/html","href":"https://www.comrevo.com/2019/07/mysql-access-denied-for-user-root-at-localhost.html","title":"Solution for Mysql error: access denied for user 'root'@'localhost' "}],"author":[{"name":{"$t":"Parag Jambhulkar"},"uri":{"$t":"https://www.blogger.com/profile/13991750622483538113"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"35","height":"35","src":"//www.blogger.com/img/blogger_logo_round_35.png"}}],"thr$total":{"$t":"0"}},{"id":{"$t":"tag:blogger.com,1999:blog-913600556879440043.post-5834521050546781195"},"published":{"$t":"2017-07-20T10:10:00.002+05:30"},"updated":{"$t":"2020-09-08T23:45:14.167+05:30"},"category":[{"scheme":"http://www.blogger.com/atom/ns#","term":"Database"},{"scheme":"http://www.blogger.com/atom/ns#","term":"Java"}],"title":{"type":"text","$t":"Basic steps in jdbc code"},"content":{"type":"html","$t":"\u003cdiv dir\u003d\"ltr\" style\u003d\"text-align: left;\" trbidi\u003d\"on\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;In this post, we will see the basic steps in jdbc starting from connection with database to the execution of SQL queries,\u0026nbsp;\u003c/span\u003e\u003cspan style\u003d\"font-size: large;\"\u003eBasic Steps in JDBC Code | Standard Steps of Developing JDBC Application |Java Database Connectivity | basic steps in jdbc code,standard steps of developing jdbc application,jdbc code,jdbc code in java,java database connectivity,java database connection jdbc and mysql\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eWatch this video to know about Basic steps in JDBC Code:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003ciframe allow\u003d\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen\u003d\"\" frameborder\u003d\"0\" height\u003d\"360\" src\u003d\"https://www.youtube.com/embed/vsv62tuO4LI\" width\u003d\"640\"\u003e\u003c/iframe\u003e\n\n\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003eWatch on YouTube:\u0026nbsp;\u003ca href\u003d\"https://www.youtube.com/watch?v\u003dvsv62tuO4LI\" target\u003d\"_blank\"\u003ehttps://www.youtube.com/watch?v\u003dvsv62tuO4LI\u003c/a\u003e\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; Following are the basic steps:\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003ca name\u003d'more'\u003e\u003c/a\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e1. Import the package.\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp;e.g.\u0026nbsp;import java.sql.*;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e2. Load and Register the Driver.\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u003cu\u003eLoad:\u003c/u\u003e The jdbc driver used for connection should be available in your system. If you are using Eclipse IDE, then you have to provide link in properties while if you are running your jdbc code on terminal, then you have to provide classpath in .bashrc file. Check details here-\u0026nbsp;\u003ca href\u003d\"http://www.comrevo.com/2017/07/how-to-run-jdbc-program-in-command-prompt-in-linux.html\" target\u003d\"_blank\"\u003ehttp://www.comrevo.com/2017/07/how-to-run-jdbc-program-in-command-prompt-in-linux.html\u003c/a\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u003cu\u003eRegister:\u003c/u\u003e In jdbc code, we need to register a driver for use. A method forName() is provided for the same purpose.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g.\u0026nbsp;Class.forName(\"com.mysql.jdbc.Driver\");\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e3. Establish a Connection to the database\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;Create a Connection object. Provide URL (with database port number, database name), user name and password.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g.\u0026nbsp;Connection con\u003dDriverManager.getConnection(\"jdbc:mysql://localhost:3306/databasename\",\"username\",\"userpassword\");\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e4. Create a Statement object from the Connection.\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;Statement object is used for executing queries on database.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g.\u0026nbsp;Statement st\u003dcon.createStatement();\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e5. Use the Statement object to execute query.\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;If we are fetching data from database, then we need to define ResultSet object. We can also perform other operations like insert, update, delete on database table.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g.\u0026nbsp;\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eResultSet rs\u003dst.executeQuery(\"select * from student\");\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003eint i\u003dst.executeUpdate(\"insert into student values(1201,'se','vjti','mumbai')\");\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e6. Process Result.\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;If we are fetching data from the database, we can get it from ResultSet object. We can process this data as per our requirement.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cb\u003e7. Close/terminate the objects.\u003c/b\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ee.g.\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003ers.close();\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003est.close();\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003econ.close();\u003c/span\u003e\u003cspan style\u003d\"font-size: large;\"\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;Check jdbc code for fetching data from database in this post:\u0026nbsp;\u003ca href\u003d\"http://www.comrevo.com/2017/07/jdbc-code-to-retrieve-data-from-mysql-database.html\" target\u003d\"_blank\"\u003ehttp://www.comrevo.com/2017/07/jdbc-code-to-retrieve-data-from-mysql-database.html\u003c/a\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; Check jdbc code for inserting data into mysql database in this post:\u0026nbsp;\u003ca href\u003d\"http://www.comrevo.com/2017/07/jdbc-code-to-insert-data-into-mysql-database.html\" target\u003d\"_blank\"\u003ehttp://www.comrevo.com/2017/07/jdbc-code-to-insert-data-into-mysql-database.html\u003c/a\u003e\u003c/span\u003e\u003cbr /\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr /\u003e\u003c/span\u003e\n\u003cbr /\u003e\n\u003ccenter style\u003d\"font-family: 'times new roman';\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003cbr class\u003d\"Apple-interchange-newline\" /\u003e\u003c/span\u003e\u003ctable border\u003d\"1\"\u003e\u003ctbody\u003e\n\u003ctr\u003e\u003cth\u003e\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cdiv style\u003d\"margin: 0px;\"\u003e\n\u003cspan style\u003d\"font-size: large;\"\u003e\u003ca href\u003d\"http://www.comrevo.com/2016/09/database.html\" target\u003d\"_blank\"\u003eCheck Other Posts on Database\u003c/a\u003e\u003c/span\u003e\u003c/div\u003e\n\u003c/div\u003e\n\u003c/th\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\u003c/center\u003e\n\u003ccenter style\u003d\"font-family: 'times new roman';\"\u003e\n\u003c/center\u003e\n\u003c/div\u003e\n"},"link":[{"rel":"replies","type":"application/atom+xml","href":"https://www.comrevo.com/feeds/5834521050546781195/comments/default","title":"Post Comments"},{"rel":"replies","type":"text/html","href":"https://www.comrevo.com/2017/07/basic-steps-in-jdbc-code.html#comment-form","title":"0 Comments"},{"rel":"edit","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/5834521050546781195"},{"rel":"self","type":"application/atom+xml","href":"https://www.blogger.com/feeds/913600556879440043/posts/default/5834521050546781195"},{"rel":"alternate","type":"text/html","href":"https://www.comrevo.com/2017/07/basic-steps-in-jdbc-code.html","title":"Basic steps in jdbc code"}],"author":[{"name":{"$t":"Parag Jambhulkar"},"uri":{"$t":"https://www.blogger.com/profile/13991750622483538113"},"email":{"$t":"noreply@blogger.com"},"gd$image":{"rel":"http://schemas.google.com/g/2005#thumbnail","width":"35","height":"35","src":"//www.blogger.com/img/blogger_logo_round_35.png"}}],"media$thumbnail":{"xmlns$media":"http://search.yahoo.com/mrss/","url":"https://i.ytimg.com/vi/vsv62tuO4LI/default.jpg","height":"72","width":"72"},"thr$total":{"$t":"0"}}]}});