Wednesday, August 7, 2013

SQL Server system function (T-SQL) and brief description.


System Functions (T-SQL)

@@ERROR : Returns the error number for the last Transact-SQL statement executed.

@@IDENTITY : Returns the last-inserted identity value.
@@ROWCOUNT : Returns the number of rows affected by the last statement.
@@TRANSCOUNT : Returns the number of active transactions for the current connection.
APP_NAME : Returns the application name for the current session if set by the application.
CASE : Evaluation a list of condition and returns one of multiple possible result expression.
CAST : (expression as data_type) / CONVERT : Convert an expression of one data type to another.
COALESCE (expression [ ,...n]) : Returns the first non null expression among its arguments.
CURRENT_TIMESTAMP : Returns the current date and time. ANSI SQL equivalent to GETDATE.
CURRENT_USER : Returns the name of the current user. Equivalent to USER_NAME().
DATALENGTH (Expression) : Returns the number of bytes used to represent any expression.
FORMATMESSAGE (msg_number , [param_value [,...n]]) : Constructs a message from an existing message
in sys.messages and returns the formatted message for further processing. 
GETANSINULL : Returns the default nullability for the database for this session.
HOST_ID : Returns the workstation identification number.
HOST_NAME : Returns the workstation name.
IDENT_INCR : Returns the increment value (returned as numeric  (@@MAXPRECISION,0)) specified during
the creation of an identity column in a table or view that has an identity column.
IDENT_SEED : Returns the seed value (returned as numeric (@@MAXPRECISION,)) that was specified when
 an identity column in a table or a view that has an identity column was created.
IDENTITY : to insert an identity column into a new table.
ISDATE (expression) : Determines whether an input expression is a valid date.
ISNULL (expression , replacement_value) : Replaces NULL with the specified value.
ISNUMERIC (expression) : Determines whether an expression is a valid numeric type.
NEWID : Creates a unique value of type unique identifier.
NULLIF (expression , expression) : Returns the null value if the two specified expression are equal.
PARSENAME (object_name , object_piece) : Returns the specified part of an object name. Parts of an object
that can retrieved are the object name, owner name, database name and server name.
PERMISSIONS ([objectid [,'column']]) : returns a value containing a bitmap that indicate the statement,
object or permissions of the current user.
SESSION_USER : Returns the user name of the current context in the current database.
STATS_DATE : Returns the date that the statistics for the specified index were last updated.
SYSTEM_USER : Allow a system-supplied value for the current login to be inserted into a table
 when no default value is specified.
USER_NAME ([ID]) : returns a database user name from a specified identification number.

13 comments:

  1. I rarely comment, but i did a few searching and wound up here "SQL Server system function (T-SQL) and brief description.".
    And I do have 2 questions for you if you usually do not mind.
    Is it simply me or does it seem like some of the comments appear
    as if they are written by brain dead folks? :-P And, if you are posting on additional online social sites, I
    would like to keep up with everything new you have
    to post. Could you list of the complete urls of your social sites like your linkedin profile, Facebook page or twitter feed?


    Also visit my page: infant snow boots

    ReplyDelete
  2. The question is which pills are effective and how the people will
    come to know about that. So, if this is you, be sure you ask your doctor about the side effects
    of the medications you take to see if they are the culprit
    causing your low desire. They no longer felt constrained by their
    condition and these blue pills helped them turn around their lives for the better.



    Feel free to surf to my web-site :: purchase viagra online

    ReplyDelete
  3. What is the best and fastest way to learn guitar?

    my web blog; violin lessons

    ReplyDelete
  4. Hello my friend! I want to say that this article is amazing, great written and come with
    approximately all significant infos. I'd like to peer extra posts like
    this .

    my homepage einstein quotes [play.google.com]

    ReplyDelete
  5. Excellent tips in the content of this article. As I review it I
    can immediately see the "marathon" approach. If a runner starts out as quickly as she has the ability to run,
    they immediately burn out. However, when you develop a "rhythm" and maintain a
    sustainable speed, you can continue to run. The way that bloggers can figure out a "rhythm" for writing
    thoughtful content is to simply set aside time to be
    inspired by other writers. Using this strategy makes it much less difficult to write rather than forcing ideas to
    break through your writer's block. What are your thoughts about this strategy?

    By the way, thanks for the quick coffee break!
    :-)

    My website :: web content writing

    ReplyDelete
  6. It's really a nice and helpful piece of information. I am satisfied that you simply shared this
    helpful info with us. Please keep us up to date like this.
    Thank you for sharing.

    My web page - on mobile technology (www.italtwitter.it).

    ReplyDelete
  7. Thanks for one's marvelous posting! I actually enjoyed reading it, you could be a great author.
    I will make certain to bookmark your blog and will come back someday.

    I want to encourage you to continue your great writing,
    have a nice weekend!

    Also visit my page; Continue Reading (http://www.dutch-liberation-team.nl/Perform_some_legwork_and_evaluate_which_sort_of_articles_your_online.)

    ReplyDelete
  8. It's in point of fact a nice and helpful piece of info. I'm happy that you shared this helpful information with us.
    Please keep us informed like this. Thanks for sharing.

    My webpage ... Johnson

    ReplyDelete
  9. I every time spent my half an hour to read this blog's
    content everyday along with a mug of coffee.

    My site check my site

    ReplyDelete
  10. Commercial landholdings can furnish an exceptional product of monthly earnings to the investors because
    the investors are among the most lucrative real estate investing.
    When a libow person gets into the business or if you need
    to have a second opinion.

    my blog :: Michael Libow, patch.com,

    ReplyDelete
  11. Rather uѕeful....looкіng onward to coming back again.



    Feel free to νisіt my wеblog Get More Information

    ReplyDelete
  12. I am not sure whete you're getting your info, but great topic.
    I needs tto spend some time learning more oor
    understanding more. Thanks foor magnificent info I was looking for this information for my mission.


    Visit my webpafe - mobile number tracker cell phone

    ReplyDelete
  13. I am noo lonǥer posiutіvе where you аre getting yoսr info, but good topic.
    I must spend some time learning much more or figuring out
    more. Thanks for great info I used to be in search of this info foг my mission.


    my website ... trace mobile number signal

    ReplyDelete