Showing posts with label Max Length. Show all posts
Showing posts with label Max Length. Show all posts

Various Sizes And Lengths In Database



But, it is suggested to use 30 as maximum column name length in SQL Server.

Feature, SQL Server 2000, Oracle 9i Database

database name length, 128, 8
column name length, 128, 30
index name length, 128, 30
table name length, 128, 30
view name length, 128, 30
stored procedure name length, 128, 30
max columns per index, 16, 32
max char() size 8000, 2000
max varchar() size, 8000, 4000
max columns per table, 1024, 1000
max table row length, 8036, 255000
max query size, 16777216, 16777216
recursive subqueries, 40, 64
constant string size in SELECT, 16777207, 4000
constant string size in WHERE, 8000, 4000


http://www.mssqlcity.com/Articles/Compare/sql_server_vs_oracle.htm

Max Length for Varchar Datatype Variable in T-SQL

There is a limit on how long a varchar datatype variable can be. It is 8,000. It obviously not enough since this kind of variable generally used dynamical SQL, especially when use with loop statement to add up with the query statement.

The solution? Don't concatenate it. Instead, execute it often and save into a WIP temporary tables. Sure, you would need to programmatically delete these temporary tables at the end of your procedure.

http://www.fotia.co.uk/fotia/DY.13.VarCharMax.aspx

Best Length in Database to Store URL

The length you need in database to store URL should be 2083. This is because popular browser Internet Explorer only accepts 2083 characters. The question is, if you do not want this length or you want a shortened for some reason however, what is the best length?

The answer might be 255. OpenID indeed is a URL. According to OpenId 1.1 Appendix D: Limits, the maximum limit for Identifier Urls is 255 bytes.


http://support.microsoft.com/kb/208427
http://openid.net/specs/openid-authentication-1_1.html#limits

Labels