.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

Can we insert data into a View in Sql Server?

Posted By :Jean Paul     Posted Date :February 24, 2011    Points :15   Category :.NET Framework 
Yes. Use INSTEAD OF Trigger on Views and achieve insert or update

You can also find related Interview Question to Can we insert data into a View in Sql Server?  below: 

What is a view? How it is related to data independence?

  
A view may be thought of as a virtual table, that is, a table that does not really exist in its own right but is instead derived from one or more underlying base table. In other words, there is no stored file that direct represents the view instead a definition of view is stored in data dictionary.

Growth and restructuring of base tables is not reflected in views. Thus the view can insulate users from the effects of restructuring and growth in the database. Hence accounts for logical data independence. (More...)

Should user input data validation occur server-side or client-side? Why?

  
All user input data validation should occur on the server at a minimum. Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user. (More...)

Name of the command to view the current amount of free (unallocated) space in the database in SQL Server?

  
Name of command is :sp_spaceused

This command displays the database_size in MB, and it's also shows unallocated space for the database. (More...)

What is the command name to shrink the data file and log file size in SQL server 2005?

  
The command name is : DBCC SHRINKDATABASE (Database Name)

This command will shrink the data file and log file size. With this command you can specify that how much percentage space you want to free.

dbcc shrinkdatabase (TempDAabase,10)


This command will free only 10% space. (More...)

Can we have order by clause in Sql Server View?

  
Inorder to have ORDER BY Clause in Sql Server

we have to restrict the rows by Using TOP clause

If there is no TOP Clause then you cannot have ORDER BY clause

in a View (More...)

Can we insert a value for the identity Column in Sql Server?

  
Yes, We can insert the value for Identity column

using SET IDENTITY INSERT ON

e-g


CREATE TABLE #Temp(ID INT IDENTITY, EmpName VARCHAR(255))

SET IDENTITY_INSERT #Temp ON
INSERT INTO #Temp(ID, EmpName)
Values(10, 'Alwyn Duraisingh.M')
SET IDENTITY_INSERT #Temp OFF
(More...)

Can you update the data in a view?

  
Answer: A view is created by joining one or more tables. When you update record(s) in a view, it updates the records in the underlying tables that make up the view.

So, yes, you can update the data in a view providing you have the proper privileges to the underlying tables. (More...)

How Do You Load Large Data To The SQL Server Database?

  
BulkCopy is a tool used to copy huge amount of data from tables. BULK INSERT command helps to Imports a data file into a database table or view in a user-specified format. (More...)

What is a VIEW in Sql Server?

  
View is a Virtual table which contains columns from one or more tables. It does not contain any data directly. A group of Query incorporated into one or more tables which is stored in the Database as a form of an Object. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend