数据库的进入
MySQL:
开启服务:cmd中进入mysql的bin目录,mysqld.exe -install
net start mysql
进入mysql:mysql -h localhost -u root -p
显示数据库:show databases;
显示数据库中的表:show tables;
显示表中的列:desc table;
sql server:
进入sql server: osql -S (local) -U sa -P password
显示所有数据库:(1)exec sp_databases
(2)select name from sys.databases
显示数据库中所有表:(1)select name from sys.tables
(2)select
name
from
sysobjects
where
type=
'U'
列出表中所有列:select
name
from
syscolumns
where
id=object_id(
'TableName'
)