-- 登录yellowcong 数据库

mysql -uroot -proot yellowcong

   

-- 查看当前数据库

select database()

   

-- 查看数据库里面的表

--table_schema 当前的数据库

--table_type='base table' 表示基础的普通表

SELECT table_name FROM information_schema.tables WHERE table_schema='yellowcong' AND table_type='base table';

   

   

-- 查询指定数据库中指定表的所有字段名column_name

-- 查看列的名称

SELECT column_name FROM information_schema.columns WHERE table_schema='yellowcong' AND table_name='sys_user';

相关文章:

  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
  • 2021-06-19
  • 2022-12-23
猜你喜欢
  • 2022-01-24
  • 2021-07-28
  • 2021-11-22
  • 2021-11-03
  • 2022-12-23
相关资源
相似解决方案