C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
2
Reply
Interview question answer in sql
Pooja Singh
9y
439
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
If you are looking for SQL interview , you can refer this featured article link. ---------------------------------------------------------------------------------------------------------- http://www.c-sharpcorner.com/article/most-asked-sql-queries-in-interview-questions/
Tushar Dikshit
8y
0
*) what is transaction & how to use in sql. Ans - A transaction is a set of operations performed so all operations are guaranteed to succeed or fail as one unit. 1. BEGIN TRANSACTION trans 2. BEGIN TRY 3. INSERT INTO Department(DeptID,DeptName,Location)VALUES(2,'HR','Delhi') 4. INSERT INTO Employee(EmpID,Name,Salary,Address,DeptID)VALUES(1,'Mohan',18000,'Delhi',1) 5. IF @@TRANCOUNT > 0 6. BEGIN COMMIT TRANSACTION trans 7. END 8. END TRY 9. BEGIN CATCH 10. print 'Error Occured' 11. IF @@TRANCOUNT > 0 12. BEGIN ROLLBACK TRANSACTION trans 13. END 14. END CATCH what is difference b\w unique key and primary key. --unique key can have nulls but primary keys cannot have nulls. --We have multiple unique key in one table but only one primary key have one table. --Unique create non cluster index by default but primary key creates a clustered index by default. *) what is entity framework & benefit.Ans- ADO.NET entity is an ORM (object relational mapping) which creates a higher abstract object model over ADO.NET components. So rather than getting into dataset, datatables, command, and connection objects as shown in the below code, you work on higher level domain objects like customers, suppliers, etc The main and the only benefit of EF is it auto-generates code for the Model (middle layer), Data Access Layer, and mapping code, thus reducing a lot of development time. • How to merge two dataset.Ans- You can merge two or more Dataset objects that have largely similar schemas to exist in the same Data Container. In my case, I have two database tables and I want to display all records from both tables in a single Data Container. For this we can use the Merge() method in C#. Rules to display two Datasets in a Grid View: • All the columns specified in the data grid must be present in both datasets. • The data type of all columns in the datasets must be the same. • The column names should match. EXAMPLE- Dataset 1=dt1; Dataset2=dt2; Dt1.merge(dt2);
Pooja Singh
9y
0
Message