求个简单的SQL语句

bolahbc 2011-01-10 10:37:57

create table test
(
testid int not null,
testname nvarchar(50) null,
testpassword nvarchar(50) null
)

insert into test(testid,testname,testpassword) values(1,'张三','12')
insert into test(testid,testname,testpassword) values(2,'李四','34')
insert into test(testid,testname,testpassword) values(3,'王五','56')
insert into test(testid,testname,testpassword) values(4,'赵六','78')

select testid,testname from test
select testpassword from test

--select testid,testname from test
--select testpassword from test
--这两条语句是必须的,主要是通过这两条语句把两条语句的查询结果拼接成一个table
--想要的结果

testid testname testpassword
----------- -------------------------------------------------- --------------------------------------------------
1 张三 12
2 李四 34
3 王五 56
4 赵六 78
...全文
43 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
bolahbc 2011-01-10
  • 打赏
  • 举报
回复
为什么我发了2次。。。
悲剧啊
这个我结了。。
dawugui 2011-01-10
  • 打赏
  • 举报
回复
select * from test
不就行了?

34,838

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧