January 2009 | SansSQL

Monday, January 26, 2009

Just for Laughs :) :) :) Marriage invitation in SQL Server Stored Procedure Style

CREATE PROCEDURE MyMarriage
@BrideGroom Char(NotBad),
@Bride Char(Good)
AS

SELECT Bride FROM
BridesList
WHERE
FatherInLaw = 'Millionaire'
AND CarCount > 2
AND HouseStatus ='TwoStoreyed'
AND BrideEduStatus='PG_or_Above'
AND HavingBrothers='NO'
AND HavingSisters ='No'
AND AllowRelocate ='YES'

SELECT Gold ,Cash,Car,BankBalance FROM FatherInLaw

UPDATE MyBankAccout SET MyBal = MyBal + FatherinLawBal
UPDATE MyLocker SET MyLockerContents = MyLockerContents + FatherinLawGold

INSERT INTO MyCarShed VALUES ('Ford')