Mssql: Difference between revisions

From Halfface
Jump to navigation Jump to search
(Created page with 'Connect to database. # tsql -S 131.115.162.11 -U hpsc -P '=_9xe=paP2F*e2hu' -p 1433 locale is "en_US.utf-8" locale charset is "UTF-8" using default charset "UTF-8" Show tabl…')
 
No edit summary
Line 1: Line 1:
Connect to database.
==Connect to database.==
  # tsql -S 131.115.162.11 -U hpsc -P '=_9xe=paP2F*e2hu' -p 1433
  # tsql -S 131.115.162.11 -U hpsc -P '=_9xe=paP2F*e2hu' -p 1433
  locale is "en_US.utf-8"
  locale is "en_US.utf-8"
Line 5: Line 5:
  using default charset "UTF-8"
  using default charset "UTF-8"


Show tables.
==Show tables.==
  1> SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'
  1> SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'
  2> go
  2> go
Line 15: Line 15:
  master  dbo    spt_values      BASE TABLE
  master  dbo    spt_values      BASE TABLE
  (5 rows affected)
  (5 rows affected)
==show databases==
1> SELECT name FROM master..sysdatabases
2> go
name
master

Revision as of 22:26, 16 September 2014

Connect to database.

# tsql -S 131.115.162.11 -U hpsc -P '=_9xe=paP2F*e2hu' -p 1433
locale is "en_US.utf-8"
locale charset is "UTF-8"
using default charset "UTF-8"

Show tables.

1> SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'
2> go
TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      TABLE_TYPE
master  dbo     spt_fallback_db BASE TABLE
master  dbo     spt_fallback_dev        BASE TABLE
master  dbo     spt_fallback_usg        BASE TABLE
master  dbo     spt_monitor     BASE TABLE
master  dbo     spt_values      BASE TABLE
(5 rows affected)

show databases

1> SELECT name FROM master..sysdatabases
2> go
name
master