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.

11 comments:

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

    my web blog; violin lessons

    ReplyDelete
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. Rather uѕeful....looкіng onward to coming back again.



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

    ReplyDelete
  10. 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
  11. 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