简体   繁体   中英

Column invalid in Stored Procedure

I added a new column called ip_address to the table using the designer in SQL Server Management Studio. I then wanted to modify a stored procedure that inserts values into the table. However when I try to modify the stored procedure the program is telling me that the column name is invalid. Is there something additional that I need to do?

INSERT INTO FicticiousTableName (user_id, load_date, page_name, ip_address) 
VALUES (@user_id, GETDATE(), @page_name, @ip_address)
  1. Check if the column names are same in the table schema
  2. Check if the new added column is null-able or not
  3. Check for default schema on your database. There maybe the case that you are expecting dbo.Table name to be updated, but there is another table with [defaultschema].Table exists. The procedure will refer to [defaultschema].Table as it does not specifically mentions any schema name

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM