encrypt-decrypt in T-SQL

Posted on 2005-05-17
Last Modified: 2008-03-17
can we encrypt and decrypt values in t-SQL. for example, when outputing data can we encrypt the value of an ID field in T-SQL. Then can we use the encrypted ID and decrypt it in T-SQL to query another set of data?
Question by:vinny45
    LVL 68

    Expert Comment

    SQL provides no direct support for that.  There are undocumented procedures that use SQL Server encryption, but it is known not to be especially strong.

    I recommend getting a third-party tool for encrypting/decrypting that is more robust.  I don't know if there are any free, good tools available or not.
    LVL 13

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    This is my first ever Article on EE or elsewhere; therefore, please bear with me if I have some discrepancies in my writing. I read many articles and questions related to "how to pass values to SSIS packages at run-time?"  Hence, this common ques…
    Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
    Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now