TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dong Lam Trien
830
986
147.6k
SQL Server delete data with Linked Table ?
Sep 24 2017 10:15 PM
Suppose you have 3 tables: TABHDBH, TABHDBHCHUYEN and TABHDBHCT
Table TABHDBH has the following fields:
NGAY DateTime;
IDHDBH int
...
Table IDHDBHCT has the following fields:
MAHDBH int
...
TABHDBHCHUYEN
NGAYCHUYEN datetime
MAHDBH int
...
RELATIONSHIP OF 3 TABLE
TABHDBHCHUYEN.MAHDBH head n
TABHDBH.IDHDBH head 1
TABHDBHCT.MAHDBH head n
DELETE
T1
FROM
TABHDBHCHUYEN T1
INNER
JOIN
TABHDBH T2
ON
T1.MAHDBH = T2.IDHDBH
INNER
JOIN
TABHDBHCT T3
ON
T2.IDHDBH = T3.MAHDBH
WHERE
(
CONVERT
(
VARCHAR
, NGAYCHUYEN, 101) <=
'01/07/2017'
)
When running the query without error only delete the 1 record in TABHDBHCHUYEN and the records in the other 2 TABLE not delete record, you see help me wrong? Created a relational table for 3 tables to Delete Rule mode to Cascade but not delete.
Reply
Answers (
2
)
cpanel database connection
How do i map table from database to already existing excel