adspace


What is sql in java?

Answer Posted / Charu Singh

SQL (Structured Query Language) in Java refers to using SQL statements to communicate with a database from a Java application. This is typically done using the JDBC (Java Database Connectivity) API.nnFor example:n`nConnection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/mydatabase", "username", "password");nStatement stmt = conn.createStatement();nResultSet rs = stmt.executeQuery("SELECT * FROM MyTable");nwhile (rs.next()) {nt// Access data from the ResultSet}nconn.close();

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is collation? : Sql dba

1229


Can we use distinct and group by together?

1133


Can delete statement be rollbacked?

1054


Do we need to rebuild index after truncate?

1138


how to start mysql server? : Sql dba

1267


What is the best sql course?

1050


what is schema? : Sql dba

1147


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2091


what are all the common sql function? : Sql dba

1131


define sql insert statement ? : Sql dba

1098


What is the current version of sql?

1094


What is your daily office routine?

2346


how to escape special characters in sql statements? : Sql dba

1114


Can we rollback truncate?

1074


Does group by remove duplicates?

1112