zoukankan      html  css  js  c++  java
  • mysql查询表名和列名字

    -- 登录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';

  • 相关阅读:
    第16次作业
    第15次作业
    第14次作业
    第13次作业
    第12次作业
    第11次作业
    第十次作业
    第九次作业
    第八次作业
    滚动视图练习
  • 原文地址:https://www.cnblogs.com/withfeel/p/11640817.html
Copyright © 2011-2022 走看看