desosav
03-12-2004, 01:40
exo mia ergasia gia sql i opia tha itan apli an ixa parakolouthisi sta teleftea mathimata....tespa.... opios bori na voithisi me ta triggers tha tou imoun evgnomon!!!
Use the database “testme”
Create a table called customers
(custid identity primary key int not null, name varchar(30), gender char(6))
Create another table called orders
(ordid identity primary key int not null, ordate datetime not null, custid int not null, tr_amount money not null)
Insert three customers, and for two of them create two transactions
Create a trigger which will disable someone to insert a customer by specifying the custid
Create a trigger which will insert its own custid although someone will try to insert a customer by specifying the custid
Create a trigger which will cancel a user’s attempt to delete a customer if the customers has respective records in the orders table
Use the database “testme”
Create a table called customers
(custid identity primary key int not null, name varchar(30), gender char(6))
Create another table called orders
(ordid identity primary key int not null, ordate datetime not null, custid int not null, tr_amount money not null)
Insert three customers, and for two of them create two transactions
Create a trigger which will disable someone to insert a customer by specifying the custid
Create a trigger which will insert its own custid although someone will try to insert a customer by specifying the custid
Create a trigger which will cancel a user’s attempt to delete a customer if the customers has respective records in the orders table