高手进来~~

winluo 2007-08-18 12:07:08
表t:,字段 t1,t2,t3,t4
表s:字段 s1,s2,s3,s4,s5,s6其中t1,s1为自动增长的id, s2,s3,s4,跟表t2,t3,t4相同的,即字段名跟长度都是一样的

需要操作:copy t表的t2,t3,t4 的一组数据insert to s表的 s2,s3,s4,并同时在s5,s6插入值
只知道copy table的语句 insert into s(s2,s3,s4) select t2,t3,t4 from t
who can help?thanks.
...全文
124 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
winluo 2007-08-20
  • 打赏
  • 举报
回复
为什么是放在 from t里面?
懒得去死 2007-08-20
  • 打赏
  • 举报
回复
insert into s(s2,s3,s4,s5,s6) select t2,t3,t4,不知道你要插入什么值,'sss' from t
yygyogfny 2007-08-20
  • 打赏
  • 举报
回复
同意楼上.
klan 2007-08-20
  • 打赏
  • 举报
回复
一样写咯

insert into s(s2,s3,s4,s5,s6) select t2,t3,t4,'aaa','bbb' from t;
winluo 2007-08-18
  • 打赏
  • 举报
回复
数据库是mysql

56,677

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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