Sql 判断数据是否存在

string sql=@"
IF NOT EXISTS (SELECT * FROM Roche_datadictionary WHERE code LIKE '001')
BEGIN
    INSERT INTO Roche_datadictionary(code) VALUES ('tom')
END
";
posted on 2008-04-03 11:19  heart-in-sky  阅读(982)  评论(0)    收藏  举报