如有两个表(sqlserver 2005数据库)
table1 和table2
table1中有字段id,title,content,auther,depart,grade,key,compress
table2中有字段id,title,content,auther
想要根据某一关键字(可能是title,content等等)从这两个表中查询出各自的title并显示,然后点击title可以链接到显示各自属性的页面。
如有人解惑将不胜感激。在线等!
table1 和table2
table1中有字段id,title,content,auther,depart,grade,key,compress
table2中有字段id,title,content,auther
想要根据某一关键字(可能是title,content等等)从这两个表中查询出各自的title并显示,然后点击title可以链接到显示各自属性的页面。
如有人解惑将不胜感激。在线等!
Iovswety
靠谱!可以说的再具体点吗?一定要两个表的
uion all
select id,title,'连接页面B.aspx?id='+cast(id as nvarchar) as lk from table2 where ....前台直接绑定就可以了