select * from authors where au_id is not null and au_lname is not null and au_Phone is not null and city =传进来的条件
如果au_id au_lname au_Phone 用户输入而改变怎么写?
------解决方案--------------------------------------------------------
- SQL code
CREATE proc Authors@au_id int(4),@au_lname varchar(10),@au_Phone varchar(20)asdeclare @sql varchar(8000)select * from authors where @au_id is not null and @au_lname is not null and @au_Phone is not null and cityexec(@sql)GO
------解决方案--------------------------------------------------------
mark