English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Pls tell me the syntax how can we insert data in view in sql server 2000

2007-01-06 17:00:16 · 3 answers · asked by shantilal y 1 in Computers & Internet Programming & Design

3 answers

CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition

2007-01-06 17:05:30 · answer #1 · answered by Jhered 3 · 0 0

You can't. Data can be inserted only into tables. Views are made only to view data, not to update it. Some databases (e.g. Access do allow to update tables through views, but not SQL Server).
If you want to update multiple tables at the time, try to make a stored procedure instead.

2007-01-08 03:03:07 · answer #2 · answered by BataV 3 · 0 0

it truly is an celebration to stick with: sq. = "insert into product (Product_id,Product_name,Product_price) values(7,'Product7',seven-hundred)" try connection.Open() adapter.InsertCommand = New SqlCommand(sq., connection) adapter.InsertCommand.ExecuteNonQuery(... MsgBox("Row inserted !! ") seize ex As Exception MsgBox(ex.ToString) end try replace the numbers in values along with your textual content field values.

2016-12-01 22:55:20 · answer #3 · answered by ? 4 · 0 0

fedest.com, questions and answers