SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software Kodyaz Development Resources
Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Vista, etc.

Wedding Query

Last post 06-03-2011, 6:22 AM by eralper. 1 replies.
Sort Posts:
  •  03-27-2010, 8:51 AM 20915

    Wedding Query

    This is from http://www.programmingsolution.net/sqlserver2005/sql-funstun/sql-funs.php

    Male has the following sql procedure;
     
    CREATE PROCEDURE MyMarriage
    (
          BrideGroom Male (25) ,
          Bride Female(20)
    )

    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 Having  Brothers IS NULL
    AND Sisters IS 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 

     

    But the female runs the below drop command :)


    DROP HUSBAND;
    Commit;

  •  06-03-2011, 6:22 AM 22418 in reply to 20915

    Re: Wedding Query

    I did not know that SQL Server has the "DROP HUSBAND" command :)
    Is it new with new version Denali, SQL Server 2011 ?

View as RSS news feed in XML
Copyright © 2004 - 2013 Eralper Yilmaz. All rights reserved.
Community Server by Telligent Systems