Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Suppose I have 3 tables. But I want to show them it in same gridview and want to update and delete operations in parallel. How can I do that?

table 1: workshop

id   contents   demonstration   coursefee  proviedMaterial
1    oneday        NULL           400        NULL
2    twoday        NULL           1200       NULL

table 2: demonstration

id   DayWorkshop   demonstration  
1    oneday        SQLInjection                 
2    oneday        XSS Demo
3    oneday        HTTrack          
4    twoday        Tools demo
5    twoday        Firewall
6    twoday        Cryptography

table 3: providedMaterial

id  DayWorkshop providedMaterial
1    oneday    Participation Certificate.
2    oneday    List of Our Latest short or long term courses .
3    twoday    Participation Certificate.
4    twoday    List of Our Latest short or long term courses Conducted.

Reason I took 3 table because I want to update all contents. Also, can I combine these 3 table into a single table so that I can easily show it in a gridview?

share|improve this question
Do you want to do updates and deletes on the same join? – Maryam Arshi Feb 26 at 6:25

closed as not a real question by Mark Storey-Smith, Max Vernon, dezso, RolandoMySQLDBA, Derek Downey Apr 29 at 20:27

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

1 Answer

You can create a view to show the information from all tables and use it in your next queries

CREATE VIEW ResultTable AS
SELECT * 
FROM workshop ws
INNER JOIN demonstration dem ON ws.contents=dem.DayWorkshop
INNER JOIN providedMaterial pm on ws.contents=pm.DayWorkshop

This will allow you to see the combined data. You can use this view to make your update and delete queries (not the view

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.