1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

More Database Jokes

Discussion in 'Coffee Corner' started by sameer, Nov 18, 2008.

  1. sameer

    sameer Forum Advisor

    Messages:
    105
    Likes Received:
    6
    Trophy Points:
    240
    Wedding SQL Query

    Code (Text):
    CREATE PROCEDURE MyMarriage
        BrideGroom Male (25),
        Bride Female (22)
    AS
    BEGIN
        SELECT Bride FROM India_Brides
        WHERE FatherInLaw = ‘Millionaire’  
            AND Count(Car) > 20   AND HouseStatus=’ThreeStoreyed’
            AND BrideEduStatus IN (B.TECH ,BE ,Degree ,MCA ,MBA)
            AND HavingBrothers = NULL
            AND Sisters = NULL

        SELECT Gold, Cash, Car, BankBalance FROM FatherInLaw

        UPDATE MyBankAccout SET MyBal = (MyBal + FatherInLawBal)

        UPDATE MyLocker SET MyLockerContents = (MyLockerContents + FatherInLawGold)

        INSERT INTO MyCarShed VALUES (’BMW’)

    END
    GO
     
    Then the wife writes the below query:
    Code (Text):

    DROP Husband;
    COMMIT;
     
     
  2. bsnavle

    bsnavle Guest

    Awesome joke
     
  3. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    Nice .. . .

    But wont compile. Lots of Syntactical errors ...
    Try compile and re-post again :)
     
  4. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    HAHAHA RoTFL... :D :p
     
  5. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    I made some correction ..

    Now the code looks like this .

    Code (Text):

    SQL> CREATE Or Replace PROCEDURE MyMarriage
    2    AS
    3   BrideGroom_m        MALE(25)  ;
    4   Bride_f             FEMALE(22);
    5   ----- Added New varialbles ---------
    6   MyFatherInLawName_m MALE(65);
    7   MyFatherInLawGold_n NOSEX(10000000000);
    8   MyFatherInLawCash_n NOSEX(10000000000);
    9   MyFatherInLawCar_n  NOSEX(10000000000);
    10  MyFatherInLawBal_n  NOSEX(1000000000000000);
    11   BEGIN
    12
    13    SELECT Bride ,
    14           FatInLaw
    15    INTO   Bride_f ,
    16           MyFatherInLawName_m
    17    FROM   India_Brides
    18    WHERE  FatherInLaw = ‘Millionaire’  
    19    AND    Carcount > 20                          -- Carcount is field name
    20    AND    HouseStatus=’ThreeStoreyed’
    21    AND    BrideEduStatus IN ('B.TECH' ,'BE' ,
    22              'Degree' ,'MCA' ,'MBA')         -- Quotes were missing
    23    AND    HavingBrothers IS NULL                 -- =NULL wont work
    24    AND    HavingSisters IS NULL;                 -- =NULL wont work
    25
    26    SELECT Gold,
    27       Cash,
    28           Car,
    29           BankBalance
    30    INTO   MyFatherInLawGold_n,
    31           MyFatherInLawCash_n,
    32           MyFatherInLawCar_n,
    33           MyFatherInLawBal_n
    34    FROM   FatherInLaw
    35    WHERE  FatInLawName = MyFatherInLawNmae_m ;
    36
    37    UPDATE MyBankAccout
    38    SET    MyBal = (MyBal + MyFatherInLawBal_n)
    39    WHERE  WhoAmI= Myname ;                      --(Myname : Pseudocoulumn)
    40
    41    UPDATE MyLocker
    42    SET MyLockerContents = (MyLockerContents +
    43                            MyFatherInLawGold +
    44                            MyFatherInLawCash_n )            -- Added MyFatherInLawCash_n
    45    WHERE  WhoAmI= Myname ;                      --(Myname : Pseudocoulumn);
    46
    47    INSERT INTO MyCarShed (WhoAmI , CarBrand )
    48      VALUES (Myname,’BMW’) ;                --(Myname : Pseudocoulumn)
    49
    50  END;
    51  /

    Procedure created.

    SQL>
     
    Recommended always to use Create OR REPLACE :) for marriage .

    After Marriage wife's query will be as follows .

    Code (Text):

    SQL> DROP TABLE HUSBAND PURGE ;

    Table dropped
     
    Better use Purge ,so that husband cannot be retrieved even from Recycle bin.
    (no need for Commit )
     
    Sadik likes this.
  6. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    wow... talk about being technically correct! :p

    loved ur procedure rajavu, would not let the wife anywhere near a terminal though, so she can't write the DROP! :D
     
  7. ah.yasar

    ah.yasar Active Member

    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    80
    hehehe .. lol ..
     
  8. Kanima

    Kanima Guest

    Hey rajavu, you r too good!!!
     
  9. Joseph Andrew

    Joseph Andrew Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    55
    Hello,Awesome joke
     
  10. dearnafees

    dearnafees Guest

    Hi, thats very nice joke
     
  11. aml ahmed

    aml ahmed Active Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    55
    ha ha

    this is the best joke in oracle
    thank u for all
     
  12. deadlock

    deadlock Active Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    100
    hehehe... cool one!
     
  13. versatile36

    versatile36 Active Member

    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    75
    lol lol... you made me laugh like anything..
     
  14. ssingh

    ssingh Active Member

    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    55
    nice joke!!
     
  15. RAMYA

    RAMYA Active Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    55
    nice guyss...
     
  16. M_Anas_O

    M_Anas_O Forum Advisor

    Messages:
    95
    Likes Received:
    9
    Trophy Points:
    160
    Location:
    Austria
    Better schedule this as a concurrent program, so that even after your wife drops your table,
    your bank balance, gold etc...will be continuously updated.
     
  17. malli_18arjun

    malli_18arjun Active Member

    Messages:
    36
    Likes Received:
    3
    Trophy Points:
    110
    Location:
    Hyderabad
    nice jokes on Database.......
     
  18. JanetteBates

    JanetteBates Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    55
    really funny... tks a lot
     
  19. robin

    robin Forum Advisor

    Messages:
    55
    Likes Received:
    7
    Trophy Points:
    160
    Location:
    Hyderabad
    Really cool....
     
  20. kiran.marla

    kiran.marla Forum Genius

    Messages:
    403
    Likes Received:
    52
    Trophy Points:
    505
    Location:
    Khammam
    very nice joke
     

    Attached Files:

    Sadik likes this.