i.e.: i have a table Customers, a table Movies, and a table Buys; what i want to do is to create a view such that, given a customer's ID it shows his/her purchases from the Buys table referencing the Movies table for the Movie ID
what i tried doing is that i treated it like a procedure, so the code is:
CREATE VIEW customerpurchases @cid int not null AS SELECT * FROM Buys WHERE cid = Buys(CID)
any help will be extremely appreciated! thanks!

New Topic/Question
Reply



MultiQuote




|