Thursday, June 21, 2007

Wedding-SQL-Query

Wedding Query....... . (SQL Server Stored Procedure Style)

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

SELECT Bride FROM india_ Brides
WHERE
FatherInLaw = 'Millionaire' AND
CarCount > 2 AND
HouseStatus ='TwoStoreyed' AND
BrideEduStatus='PG orAbove' AND
HavingBrothers='NO' AND
HavingSisters ='No' AND
AllowRelocate ='YES'

SELECT Gold ,Cash,Car,BankBalan ce FROM FatherInLaw

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

INSERT INTO MyCarShed VALUES ('BMW')

END
GO

.

.

.

Then the wife writes the below query:

DROP HUSBAND

Commit

3 comments:

Unknown said...

excellent !!!!!

Unknown said...

Full marks for the Last Query :)

Anonymous said...

Few things stupid about wife's SQL

After dropping husband the wife is on roads. Everything was already taken.

Even FIL in the above query cannot save here

Also DROP doesn't need a COMMIT.
May be, she mean "Commit Suicide" LOL !!!

She should actually try a REPLACE or a CASE structure here.

Request To The Visitor.

Please don't forget to write your comment's OR suggestions at the end of the blog. Have a nice time.... & Thanks in advance....