MouthShut.com Would Like to Send You Push Notifications. Notification may includes alerts, activities & updates.

OTP Verification

Enter the 4-digit code
For Business

Article Rated By

SQL Query

By: b1unt_reviewsonly Verified Member MouthShut Verified Member | Posted Oct 25, 2010 | General | 661 Views

WeddingQuery........ ........ (SQL Style)


HUSBANDS QUERY


CREATE PROCEDUREMyMarriage (


BrideGroom Male (25) ,


Bride Female(20) )


AS


BEGIN



SELECTBride FROMindia_ Brides


WHEREFatherInLaw = 'Millionaire'


ANDCount(Car) > 20 ANDHouseStatus ='ThreeStoreyed'


ANDBrideEduStatus IN (B.TECH ,BE ,Degree ,MCA ,MiBA) AND


having Brothers= Null ANDSisters =Null


SELECTGold ,Cash,Car,BankBalance


FROMFatherInLaw


UPDATEMyBankAccout


SETMyBal = MyBal + FatherInLawBal



UPDATEMyLocker


SETMyLockerContents = MyLockerContents + FatherInLawGold



INSERT INTOMyCarShed VALUES('BMW')


END


GO


Then the wife writes the below query:


DROPHUSBAND;


Commit;J


You loved this blog. Thank you for your rating.
X