What is sql in java?



What is sql in java?..

Answer / 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

More SQL PLSQL Interview Questions

what are local and global variables and their differences? : Sql dba

1 Answers  


What is the best sql course?

0 Answers  


Explain clause in sql?

1 Answers  


What are the uses of sysdate and user keywords?

1 Answers  


Is inner join faster than left join?

0 Answers  


Write a program that shows the usage of while loop to calculate the average of user entered numbers and entry of more numbers are stopped by entering number 0?

1 Answers  


What is a dirty read sql?

1 Answers  


What is function and procedure in pl sql?

1 Answers  


Can primary key be changed?

1 Answers  


What do you think about pl/sql?

1 Answers  


What is delete command in sql?

1 Answers  


What is the maximum rows in csv?

1 Answers  


Categories