Home > database >  SQL server problem statement
SQL server problem statement

Time:11-16

New table: B_MTL_Type needs to contain fields: MTL_Type_ID int, MTL_Type_Name varchar (50), Parent_ID int
To insert data B_MTL_Type table:
1, equipment, 0
1
2, computer equipment,3, display devices, 1
4, digital equipment, 1
5, notebook, 2
6, desktop, 2
7, server, 2
8, display, 3
9, the television, 3
10, projector, 3
11, mobile phones, 4
12, walkie-talkies, 4
13, digital camera, 4
14, monitoring equipment, 1

Operation:
A. will computer equipment all transferred to A subset of the monitoring devices,
B. shows that a subset of the equipment and digital equipment under a subset of the swap,
Don't know how to transfer a subset, a great god please help

CodePudding user response:

A:
The update form
The set Parent_ID=14
Where Parent_ID=2

B:
This like A, but I need A numerical as intermediate temporary values that have not been used

CodePudding user response:

No, can't use the parent_id values

CodePudding user response:

Cannot appear in the SQL statement parent_id list of values

CodePudding user response:

How many relationship?

CodePudding user response:

to yearn for the future reference 3 floor response:
cannot appear in the SQL statement parent_id list the value of the

Why can't appear parent_id list of values?
The last is to update the table B_MTL_Type
  • Related