Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC 12951-insert insert/update records with some of the columns having NULL value.
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Clark
insert/update records with some of the columns having NULL value.
1 Answer(s)      4 years ago
Posted in : JDBC


How do I insert/update records with some of the columns having NULL value?


Advertisement
View Answers

November 15, 2010 at 4:12 PM


Hi friends,

Use either of the following PreparedStatement methods: public void setNull(int parameterIndex, int sqlType) throws SQLException public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException These methods assume that the columns are nullable. In this case, you can also just omit the columns in an INSERT statement; they will be automatically assigned null values.

Thanks.



Related Tutorials/Questions & Answers:
insert/update records with some of the columns having NULL value.
insert/update records with some of the columns having NULL value.  How do I insert/update records with some of the columns having NULL value
Output of null value
main(String [] args){ String str=null; System.out.println(str); } } Output value Null Description:- In the given example... a String variable and initialized it with null value
Advertisements
mysql query for null value
mysql query for null value   What mysql query for null value i need... { //echo message } To check if the object contain any value or not ..just compare it with zero. If the value for object is greater than zero display
adding some value to new column
adding some value to new column   how to update a column having some value into new column that also have some value i need to add this two value in java using result set we can get all the column data but how to add these value
Error in checking null value in string
Error in checking null value in string  Error in checking null value... in the following code: String registerno=null; registerno=request.getParameter("registerno"); int r=0; if(!registerno.equals(null)) /* Error line */ { r=1; } Can
How to delete a directory which is having some files already.
How to delete a directory which is having some files already.  I want to delete a directory which is already having some files. If anyone have the idea please provide solution. Thanks & Regards ali shaik.   Delete
SQL NOT NULL Constraint
a value. Simply, neither you insert or update a new record without ... value to record ,the records shows you SQL NOT NULL Constraint. Create... create a table ,we define a field attribute, data type, null value etc
Using insert update and delete in the same servlet
Using insert update and delete in the same servlet  How to write insert, update and delete coding in the same servlet
Update a group of records with one value in the same group
Update a group of records with one value in the same group  I want to update my table group wise, i have three cases AA,BB,CC , if group of records... be update with AA. If group is not having AA value second priority is BB next CC
receiving null value in back bean by the jsf page
receiving null value in back bean by the jsf page  i have done above things but i m receiving null value in back bean by the jsf page plz tell me solution as soon as possible
Why string is storing null value - IoC
it is also storing null value in temp. WHY so...Why string is storing null value  I am reading lines from a file and then splitting it with " " as the criteria If line has first element null
Spring Null value, Set null value in Springs configuration file
Spring Null value, Set null value in Springs configuration file In this example you will see how to set null value in the Spring configuration file... it will display output as shown below:     null Download
getting null value in action from ajax call
getting null value in action from ajax call  Getting null value from...; ... <tr> <td><s:label value="Course " for="course...;s:if test="branchList != null"> <tr><td><s:select name
getting null value in action from ajax call
getting null value in action from ajax call  Getting null value from...; ... <tr> <td><s:label value="Course " for="course...;s:if test="branchList != null"> <tr><td><s:select name
getting null value in action from ajax call
getting null value in action from ajax call  Getting null value from...; ... <tr> <td><s:label value="Course " for="course...;s:if test="branchList != null"> <tr><td><s:select name
How do I sort by mutiple columns that are in ArrayList using some comparable class
How do I sort by mutiple columns that are in ArrayList using some comparable class  Iam reading a csv file with 20 columns (all string types) in ArrayList after splitting them. I need to find how can I sort muti columns (i.e.
How to insert and update all column values of database from jtable.
How to insert and update all column values of database from jtable.  ...; JButton update; JButton insert; JButton delete; JPanel p; MyTableModel tm... = new JButton("Update"); insert = new JButton("Add"); delete = new
How to insert and update all column values of database from jtable.
How to insert and update all column values of database from jtable.  ...; JButton update; JButton insert; JButton delete; JPanel p; MyTableModel tm... = new JButton("Update"); insert = new JButton("Add"); delete = new
getting null value in my class when using t:inputFileUpload
getting null value in my class when using t:inputFileUpload  getting null value in my class when using t:inputFileUpload
How to insert and update all column values of database from jtable.
How to insert and update all column values of database from jtable.  ...,update,delete .. mydatabase contains five columns id,name,address,contact,email...; JButton update; JButton insert; JButton delete; JPanel p; MyTableModel tm
getting null value in my class when using t:inputFileUpload
getting null value in my class when using t:inputFileUpload  getting null value in my class when using t:inputFileUpload i have implemented all... changes in web.xml also still getting null value when i access in my bean Thanking
Mysql Multiplication Columns
Mysql Multiplication Columns       Mysql Multiplication Columns is used to provide the column that is the outcome product of all the records in the respective columns
Mysql Multiplication Columns
Mysql Multiplication Columns       Mysql Multiplication Columns is used to provide the column that is the outcome product of all the records in the respective columns of a table
Clicking F5 and reentering value throws Null pointer exception
Clicking F5 and reentering value throws Null pointer exception  Hi, My page performs search operation.Normally when i enter a value and click... refresh my page and enter any value it is throwing Null pointer exception.can
simple web appllication to insert, update or display from database - JSP-Servlet
simple web appllication to insert, update or display from database  hello sir i am using netbeans 5.5 ide with tomcat and oracle 9 i as database... in which we can insert, update or delete data from database. i can also display
SQL NOT NULL Constraint
the records from table 'Stu_Class_10'.When you do not insert any value to record.... This specify that NOT NULL Constraint enforce the field to accept a value. Simply, neither you insert or update a new record without  adding
Null value when i set interface object in form controller - Spring
Null value when i set interface object in form controller   Hi all, i am very new about spring and hibernate. i got null value when i set... got NULL pointer exception ... please guide me if any one know ...it is very
Mysql Alter Not Null
; Mysql Alter Not Null is used to perform when we want records... fieldnames and datatypes respectively. Each records in the table created with Null... to show the fieldname, Type, Null, Key ,Default value of table 'user_table
PHP Null Variables
value. The Null value indicates that the used variable has no value. The variable only considered null when : 1. The variable assigned as a null. 2. The value... the variable assigned as a null. Even you can leave the value blank. Let's
HAVING Clause in JPQL (Java Persistence Query Language)
with the SELECT statement to filter the records. A HAVING clause restricts... HAVING Clause in JPQL (Java Persistence Query Language... to use of HAVING Clause in jpql (Java Persistence Query Language). HAVING Clause
The null keyword
and assigning a value to a variable. Assigning a null value to a non... The null keyword       The null keyword in java programming language is a reserved word that is used
 

 

 

DMCA.com