recursive case in sql

abdelilah abouragba 0 Reputation points
2023-06-13T10:30:04.7333333+00:00

i have a conflict in the insert statement with the foreign key of the same table . the problem occurs while the insert :

my table is such : staffs (staff_id, name,phone, manager_id)

and the manager_id is a foreign key that references staffs( staff_id)

SQL Server Other
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2023-06-13T11:32:10.4733333+00:00

    That's really to less on information. How does your SQL look like?

    Please post table design as DDL, some sample data as DML statement and the expected result.

    0 comments No comments

  2. 2023-06-14T04:16:36.3066667+00:00

    Please post table design as DDL, some sample data as DML statement and the expected result.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.