字符串如何查询
程序代码:
create cursor b1 (jnh n(1),mc c(3)) insert into b1 values (1,"ab") insert into b1 values (2,"abc") insert into b1 values (3,"ac") insert into b1 values (4,"bc") insert into b1 values (5,"A5") create cursor b2 (jnh n(1),mc c(2)) insert into b2 values (1,"ab") insert into b2 values (2,"aba") insert into b2 values (3,"a")
查两表mc中完全相同的记录。
SELECT * FROM b1 WHERE ALLTRIM(mc) in (SELECT ALLTRIM(mc) FROM b2)
这个查法不行,应如何进行?谢谢!