当前位置: 代码迷 >> Sql Server >> 求大神给看一眼 到底哪里错了
  详细解决方案

求大神给看一眼 到底哪里错了

热度:20   发布时间:2016-04-24 09:36:23.0
求大神给看一眼 到底错哪了
/*
create table hy_history 
(
hy_id varchar(20) not null,
hy_number varchar(20) not null,
hy_sub_points int not null,
operator varchar(20) not null,
hy_sub_time datetime not null
)
*/


insert  into hy_history values('hy_id','hy_number',hy_sub_points,'operator',hy_sub_time) 
select hy_id,hy_number,55,'admin',getdate() from vip_hy where hy_number='888888'


错误提示:
消息 207,级别 16,状态 1,第 2 行
列名 'hy_sub_points' 无效。
消息 207,级别 16,状态 1,第 2 行
列名 'hy_sub_time' 无效。

------解决思路----------------------
insert  into hy_history values('hy_id','hy_number',hy_sub_points,'operator',hy_sub_time)
这儿错了,这你说下你想做什么呢
------解决思路----------------------
insert  into hy_history ('hy_id','hy_number',‘hy_sub_points’,'operator',‘hy_sub_time’) 
select hy_id,hy_number,55,'admin',getdate() from vip_hy where hy_number='888888'
  相关解决方案