In Transact SQL you can assign a 10-character value to a VARCHAR(5) variable, as follows: DECLARE @c VARCHAR ( 5 ); SET @c = '1234567890' ; PRINT @c 12345 The value will be silently truncated without raising an error. Because of this behavior it may be very easy to make mistakes. For example, consider the following table and stored procedure: CREATE TABLE Data . Codes ( Code VARCHAR ( 5 ), Description VARCHAR ( 40 ) ); GO CREATE PROCEDURE Readers . SelectCodes @Code VARCHAR ( 5 ) AS BEGIN SELECT...(read more)
Source Click Here.
A
New
Internet
Library: Add Your Website/Blog
or Suggest A Website/Blog to our Free Web Directory
http://anil.myfunda.net.
Its very simple, free and SEO Friendly. Submit Now....
Its very simple, free and SEO Friendly. Submit Now....
Subscribe to:
Post Comments (Atom)


Post a Comment