alter table customers drop column a check(a like '%@%')

解决方案 »

  1.   

    因为在列上建立了约束,删除前应该先删除约束 
    alter table customers drop constriant CK__customers__a__45F365D3
    alter table customers drop column a
      

  2.   

    use et
    alter table customers add a varchar(50) null alter table customers add constraint name1 check(a like '%@%')alter table customers drop column a
      

  3.   

    刚才敲错单词了   
    alter table customers drop constraint CK__customers__a__45F365D3
    alter table customers drop column a
      

  4.   

    --分开写,不要合在一起,否则你不知道约束名:
    alter table customers add a varchar(50) null
    alter table customers add constraint chk_a check(a like '%@%')
    go
    --先要删除约束再删列
    alter table customers drop constraint chk_a
    alter table customers drop column a
      

  5.   

    alter table customers drop constraint CK__customers__a__45F365D3
    go
    alter table customers add constraint CK__customers_a check(a like '%@%')
    go
      

  6.   

    环境SQL server2000
    asp
    程序代码
    Ordertime=Now
    环境SQL server2000
    asp
    程序代码
    Ordertime=Now
    Sql1="Insert Into OrderToSupplier(OrderDate,SupplierID) Values('" & Ordertime & "','"& Request.Form("D1") & "')"错误提示
    Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
    [Microsoft][ODBC SQL Server Driver][SQL Server]从字符串转换为 smalldatetime 数据类型时发生语法错误。哪个帅哥,倩女帮帮忙,我给分
      

  7.   

    to ls20040405(老鼠) :
    smalldatetime =>
    换成datetime 类型试试..
      

  8.   

    to: wutao411(了缘) 
    alter table customers drop column a check(a like '%@%')
    在关键字 'check' 附近有语法错误。
    编译器这么说的,怎么回事啊? lsxaa(小李铅笔刀) 是对的,我解决拉,哈哈 pbsql(风云)你的运行下来还是解决不了啊,
    服务器: 消息 1759,级别 16,状态 1,行 2
    在约束或计算列的定义中指定了无效的列 'a'。
    服务器: 消息 1750,级别 16,状态 1,行 2
    未能创建约束。请参阅前面的错误信息。
    服务器: 消息 3728,级别 16,状态 1,行 2
    'chk_a' 不是约束。
    服务器: 消息 3727,级别 16,状态 1,行 2
    未能除去约束。请参阅前面的错误信息。
    是这个结果,为什么啊? bernice99(宝宝) 的也差不多是这样,为什么?你们能出来结果吗?希望告诉我下啊,在下初学想多多了解下.明天结贴,以上各位大虾都会得到响应的分,谢谢指教