如果建这个存储过程?学习学习.

各位。输入一个关键字。然后得到一个表中所有包含这个关键字的记录。当然要去掉重复的记录。帮帮忙。我是sql server的新手。
[63 byte] By [alexgeng] at [2008-2-13]
# 1
select distinct * from yourtable where yourcolumn=yourkey
sky_blue-蓝天2007 at 2007-10-20 > top of Msdn China Tech,MS-SQL Server,基础类...
# 2
多个字段呢?是不是
select distinct * from yourtable where yourcolumn1=yourkey or yourcolumn2=yourkey

是不是选择出来的是没有重复的?
alexgeng at 2007-10-20 > top of Msdn China Tech,MS-SQL Server,基础类...
# 3
多個字段的話就是組合字段結果的distinct
szowient-szowient at 2007-10-20 > top of Msdn China Tech,MS-SQL Server,基础类...