Skip to content

Instantly share code, notes, and snippets.

@lee-pai-long
Created January 20, 2016 14:24
Show Gist options
  • Save lee-pai-long/aa0a73b86bd00d68f8d5 to your computer and use it in GitHub Desktop.
Save lee-pai-long/aa0a73b86bd00d68f8d5 to your computer and use it in GitHub Desktop.

[SQLSERVER] List all tables in database

Connect to server

> osql -S SERVER/INSTANCE -E

(-E allow to connect without password)

Select DATABASE

> use DATABASE

List tables in database

> SELECT * FROM sysobjects WHERE xtype = 'u'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment