SQLite Forum

how to refuse write empty value
Login
utilizing sqlite inside of windows shell script, need to generate error if some variables are evalute to nothing (default behaviour if variable is not defined). 

INSERT into tab (col1,col2,col3) values ('%val1%','%val2%','%val3%')

if variable %val2% is not defined, need the INSERT is rejected, but now it vrite record with col2 empty value. Have set-up NOT NULL constraint but it does not help. As I am just read that in sqlite NOT NULL is not same as NOT EMPTY, trying to add != '' constraint also but it does not help. What am I doing wrong?