update table set yourfield = null where ...

解决方案 »

  1.   

    自己组合SQL语句就可以。var tempstr:string;
    tempstr='null';
    query1.sql.add( 'insert table values(@a,@b,'+tempstr+')' )
    parambyname('@a').asinteger=1;
    parambyname('@b').asinteger=2;
    query1.execsql;就是这样。
      

  2.   

    前台赋一空值(''),
    存储过程接收时即为null
      

  3.   

    parambyname( '@a' ).clear;  //  将此参数设为null
      

  4.   

    就是Is Null
    一般用SQL,我都是用Format来组合SQL语句,从不或很少用Param,很方便啊。
    Format('select * from %s where Field1=%s and Field2 =%d and Field3 %s', 
      ['tablename', '13', 31, 'is null']);
      

  5.   

    同意Raptor(猛禽),不过你的参数名怎么取那么怪?
      

  6.   

    'select * from table where field =''null'''
      

  7.   

    -->hj308: Null不需要加引号
      

  8.   

    在select语句中判断是否为空用field1 IS (NOT) NULL ,要是赋值就用field1 = NUIL
      

  9.   

    怎么搞这么久还没有解决啊?你自己回去试试不就行了?如果赋值是' '的话,SQL Server会认为是一个空格,而不是NULL值,要赋NULL值,一定要用'NULL'这个字符串。致于其它数据库我就不感保证。