i am using mysql as back end in my android app but i want to do some if any user try to enter null record (empty fields) than it can’t write in mysql table is it possible to prevent to entering null record in table.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can mark the columns as
NOT NULL. This will prevent any NULL value to be entered in those columns.The query will fail to execute if aNULLvalue is entered. In the front end you can display an error msg if the if the query fails, to let the user enter the correct value.