Three types of JDBC Statement 1. Statement Code: Statement st = conn.createStatement(); 2. PreparedStatement Code : PreparedStatement pst = con.prepareStatement("SELECT * FROM my_table WHERE id = ?"); pst.setInt(1, 345); 3. CallableStatement Code: CallableStatement cst = conn.prepareCall(" {call update_customer(?, ?) } "); cst.setString(1, "hohn"); cst.setString(2, "Doe"); Scrollable ResultSet Statement st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ResultSet rs = st.executeQuery("Select * From my_table); ;
Posts
Showing posts from May, 2023
- Get link
- X
- Other Apps
Data Types of Python : There are several types of Built-in data types in Python. 1. Numeric Type : Numeric types include integers, floats, and complex numbers. Integers are whole numbers, floats are decimal numbers, and complex numbers are numbers with a real and imaginary part. 2. Boolean Type : The Boolean type represents truth values, which can be either True or False. 3. Sequence Types Sequence types include strings, lists, and tuples. Strings are sequences of characters, while lists and tuples are sequences of values of any data type. 4. Mapping Type The mapping type is represented by dictionaries, which are collections of key-value pairs. 5. Set Types Set types include sets and frozensets. Sets are unordered collections of unique values, while frozensets are immutable sets. Small Code related to Data Types is below : # Numeric Types my_int = 42 my_float = 3.14 my_complex = 2 + 3j # Boolean Type my_bool = True # Sequence Types my_string = "Hello, Wo...