插入问题消息 213,级别 16,状态 1,第 2 行 [英] Insert issue Msg 213, Level 16, State 1, Line 2

查看:32
本文介绍了插入问题消息 213,级别 16,状态 1,第 2 行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一般新手 SQL 问题问题...

General newbie SQL question probs...

为什么这不起作用 - 或者,这意味着什么?

Why doesn't this work - or, what does this mean?

INSERT INTO test_db.dbo.Customers2
  SELECT FirstName
  FROM jas_test_db.dbo.Customers
  WHERE (Customers.FirstName = Firstname)

我明白了:

消息 213,级别 16,状态 1,第 2 行
列名或提供的值数量与表定义不匹配.

Msg 213, Level 16, State 1, Line 2
Column name or number of supplied values does not match table definition.

推荐答案

你应该为 Customers2 提供列名:

You should supply column name for Customers2:

INSERT INTO test_db.dbo.Customers2(**Firstname**)

SELECT FirstName

FROM jas_test_db.dbo.Customers

WHERE (Customers.FirstName = Firstname)

这篇关于插入问题消息 213,级别 16,状态 1,第 2 行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆