Join the DZone community and get the full member experience.
Join For Free
Build fast, scale big with MongoDB Atlas, a hosted service for the leading NoSQL database. Try it now! Brought to you in partnership with MongoDB.
This week’s short code snippet shows how to list all the user table objects in a SQL Server Compact database file. Notice that a SQL Server Compact database can also contain a number of system tables, these can be created by the Merge Replication/RDA/Sync Framework APIs. The metadata (like list of tables) is not exposed as tables, but as something called views, specifically the INFORMATION_SCHEMA views (despite the fact that SQL Server Compact does not support user defined views).
SELECT table_name AS Name FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE <> N'SYSTEM TABLE'
Now it's easier than ever to get started with MongoDB, the database that allows startups and enterprises alike to rapidly build planet-scale apps. Introducing MongoDB Atlas, the official hosted service for the database on AWS. Try it now! Brought to you in partnership with MongoDB.
Published at DZone with permission
Erik Ejlskov Jensen, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.