Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

jdbc insert example from input values

// 2. Create a statement
	String sql = "insert into employees "
			+ " (last_name, first_name)" + " values (?, ?)";
	myStmt = myConn.prepareStatement(sql);
	// set param values
	myStmt.setString(1, lastName);
	myStmt.setString(2, firstName);
	// 3. Execute SQL query
	myStmt.executeUpdate();
Source by www.luv2code.com #
 
PREVIOUS NEXT
Tagged: #jdbc #insert #input #values
ADD COMMENT
Topic
Name
6+2 =