Question 7:
[1] Create a trigger named tr_insert_SalesEmployees for the insert statement on table SalesPerson so that
when we insert one or more sales employees into the table Sales Person,
the system will display salesID, salesName, birthday, sex, salesAddress corresponding to the sales employees that have been inserted.
for example, when you execute the following statement, the system will display the results as in the following figure:
insert into Sales Person (salesID, salesName, birthday, sex, salesAddress)
values (30121050983, N'Nguyễn Anh Đào', '19850318', 'F', N'TP. Hà Nội')
salesID
salesName
birthday sex salesAddress
30121050983
Nguyễn Anh Đào
1985-03-18 F
TP. Hà Nội
1
Question 8:
Picture 7.1
[1] Create a stored procedure named proc_mechanic_service Ticket to calculate the count of distinct service Ticket belonging to a given mechanic person
where @mechanic decimal(18,0) is an input parameter and @numberOfservice Ticket int is an output parameter of the procedure
+ 100%
Zoom
Close