在sql查询中遇到问题 [英] Getting Problem in sql Query

查看:69
本文介绍了在sql查询中遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将数据插入库存表,然后从产品表中选择产品编号.

我正在写查询...但收到错误的无效ProductName

这是SQL查询..

i am inserting the data in stock table, and selecting the productid from products table.

i am writing the query... but getting error invalid ProductName

here is the sql query..

insert into stock(productid,productname,supplierName,SupplierCell,SupplierAddress,OrderedQuantity) select productID,'cb1','farooq','0345','lahore','20' from Products where ProductName='cb1'



我遇到错误



I am getting Error

Msg 208, Level 16, State 1, Line 1
Invalid object name 'Products'.

推荐答案

检查表名:它抱怨"Products"不存在,而不是"ProductName"
Check your table names: it is complaining that "Products" does not exist, not "ProductName"


确保在数据库中列出了表名称产品.检查您是否正确编写.您的代码不足以识别出哪里出了问题.请发布更多信息.
Make sure that Table name Products is listed in Database. check you write it correctly or not. your codes is not enough to identify whats wrong going there. please post more information.


这篇关于在sql查询中遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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