The following table specifies the maximum size limitations for several database objects defined in Microsoft SQL Server Compact 3.5 databases.
Maximum size limitations
Columns in a table
4 GB 1
Database size increase
1-page or 16-page increments, depending on table size
Size of BLOB (ntext and image) column
Characters in an SQL statement
Columns in a cursor
Columns in an ORDER BY, GROUP BY, or DISTINCT clause
Levels of nested subqueries
Operands in a query
Tables in a join
Cannot be indexed
Bytes in an index key
Columns in an index
Indexes per table
PRIMARY KEY, UNIQUE, Default constraints, and FOREIGN KEY
Constraints per table
1The default maximum size is 128 MB for devices and 256 MB for desktops.
2This limit is applied only if a storage engine temporary table is used for implementing ORDER BY. If the Query Processor can leverage an existing index, there is no maximum column-number limit.
3 Longer keys are supported, but the data is truncated and a checksum is added at the end. For equivalence operations, this works fine (unless two checksums happen to be the same). This becomes a concern when using an ORDER BY clause. The ordering beyond the key length is returned based on the checksum and not the actual value.
4For every PRIMARY KEY and UNIQUE constraint defined on a table, an index is created on those columns. These indexes all count against the total number of indexes allowed for a table. Also, some data types (ntext, image) cannot be used as primary key columns because they cannot be indexed