×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Login
Packages
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Login
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
Arushi
has Published
199
Answers
How to create a Stored procedure in Oracle database using JDBC API?
JDBC
Java 8
Object Oriented Programming
Programming
Database
Arushi
Published on 16-May-2019 14:26:41
Stored procedures are sub routines, segment of SQL statements which are stored in SQL catalog. All the applications that can access Relational databases (Java, Python, PHP etc.), can access stored procedures.Stored procedures contain IN and OUT parameters or both. They may return result sets in case you use SELECT statements. ...
Read More
How to retrieve a record from an existing table in oracle database using JDBC API?
JDBC
Java 8
Object Oriented Programming
Programming
Database
Arushi
Published on 16-May-2019 12:48:27
You can update/modify the existing contents of a record in a table using the UPDATE query. Using this you can update all the records of the table or specific records.SyntaxUPDATE table_name SET column1 = value1, column2 = value2...., columnN = valueN WHERE [condition];To update the contents of a record in ...
Read More
How to drop a table from Oracle database using JDBC API?
JDBC
Java 8
Object Oriented Programming
Programming
Arushi
Published on 16-May-2019 12:41:34
You can insert records into a table using the INSERT query.SyntaxINSERT INTO TABLE_NAME (column1, column2, column3, ...columnN) VALUES (value1, value2, value3, ...valueN); Or, INSERT INTO TABLE_NAME VALUES (value1, value2, value3, ...valueN);To insert a record into a table in a database using JDBC API you need to −Register the Driver: Register ...
Read More
How to generate multiple insert queries via java?
JDBC
Java 8
Object Oriented Programming
Programming
Arushi
Published on 16-May-2019 12:28:32
JDBC provides a mechanism known as batch processing, in which you can group a set of INSERT or, UPDATE or, DELETE commands (those produce update count value) and execute them at once. You can insert multiple records in to a table using this.Adding statements to the batchStatement, PreparedStatement and CallableStatement ...
Read More
How to get Row and Column Count from ResultSet in JDBC
JDBC
Java 8
Object Oriented Programming
Programming
Arushi
Published on 16-May-2019 12:25:12
Row countThe last() method of the ResultSet interface moves the cursor to the last row of the ResultSet and, the getRow() method returns the index/position of the current row.Therefore, to get the number of rows move the cursor to the last row using the last() method and get the position of that (last) row ...
Read More
How to get the table name of the current ResultSet using JDBC?
JDBC
Java 8
Object Oriented Programming
Programming
Arushi
Published on 16-May-2019 12:16:07
You can get the name of the table in the current ResultSet object using the getTableName() method of the ResultSetMetaData interface. This method accepts an integer value representing the index of a column and, returns a String value representing the name of the table that contains the given column.Let us create ...
Read More
How to Maintain an open ResultSet after commit in JDBC?
JDBC
Java 8
Object Oriented Programming
Programming
Arushi
Published on 16-May-2019 12:04:24
ResultSet holdability determines whether the ResultSet objects (cursors) should be closed or held open when a transaction (that contains the said cursor/ ResultSet object) is committed using the commit() method of the Connection interface.ResultSet interface provides two values to specify the holdability namely CLOSE_CURSORS_AT_COMMIT and HOLD_CURSORS_OVER_COMMITIf the holdability of the ...
Read More
How to get all table names from a database using JDBC?
JDBC
Java 8
Object Oriented Programming
Programming
Arushi
Published on 16-May-2019 11:54:01
You can get the list of tables in the current database in MySQL using the SHOW TABLES query.Show tables;Following JDBC program retrieves the list of tables in the database by executing the show tables query.Exampleimport java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; public class ListingTables { public static void ...
Read More
How do you check if a ResultSet is closed or not in JDBC?
JDBC
Java 8
Object Oriented Programming
Programming
Arushi
Published on 16-May-2019 11:48:35
Whenever we execute SQL statements using the executeQuery() method, it returns a ResultSet object which holds the tabular data returned by the SELECT queries(in general).The ResultSet object contains a cursor/pointer which points to the current row. Initially this cursor is positioned before first row (default position).The isClosed() method of the ResultSet interface ...
Read More
How to move the ResultSet cursor to the last row in JDBC?
JDBC
Java 8
Object Oriented Programming
Programming
Arushi
Published on 15-May-2019 16:38:46
Whenever we execute SQL statements using the executeQuery() method, it returns a ResultSet object which holds the tabular data returned by the SELECT queries (in general).The ResultSet object contains a cursor/pointer which points to the current row. Initially this cursor is positioned before first row (default position).You can move the cursor ...
Read More
1
2
3
4
5
6
7
...
20
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout