新聞中心
mysql中怎么查看數(shù)據(jù)表內(nèi)容
啟動,關(guān)閉MySQL
創(chuàng)新互聯(lián)公司-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價比和龍網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式和龍網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋和龍地區(qū)。費用合理售后完善,10余年實體公司更值得信賴。
在CMD中輸入: net start mysql
在服務(wù)管理器中啟動,關(guān)閉.
MySQL登錄在CMD中輸入
mysql –h localhost –u root -p
查看數(shù)據(jù)庫: show databases;
使用數(shù)據(jù)庫: use db_name;
查看表: show tables;
查看表結(jié)構(gòu): describe table_name;要是不想用命令就在安裝MYSQL的瀏覽器,直接在里面打開看就好了
怎么查詢mysql 的表的字符編碼
需要以root用戶身份登陸才可以查看數(shù)據(jù)庫編碼方式(以root用戶身份登陸的命令為:mysql -u root –p,之后兩次輸入root用戶的密碼),查看數(shù)據(jù)庫的編碼方式命令為:
show variables like 'character%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
從以上信息可知數(shù)據(jù)庫的編碼為latin1,需要修改為gbk或者是utf8;
mysql數(shù)據(jù)庫如何查看創(chuàng)建表的代碼
采用命令show create table table_name即可查看MySQL數(shù)據(jù)庫表的建表語句。
如何查看mysql數(shù)據(jù)庫中有哪些表?
use 數(shù)據(jù)庫名
show tables就能看到這個庫中所有的表
或者更直接一點,你到mysql 的data文件夾下看看,有多少個文件夾就有多少個庫,看看有多少個不同的文件名,就有多少個表
//看當前使用的是哪個數(shù)據(jù)庫 ,如果你還沒選擇任何數(shù)據(jù)庫,結(jié)果是NULL。mysqlselect database(); +------------+ | DATABASE() | +------------+ | menagerie ?| +------------+
如何查看Mysql中有哪些數(shù)據(jù)庫和表
我想要知道自己的Mysql中有哪些數(shù)據(jù)庫和表,該如何查看?
2006-6-20 02:22 lcy234
show databases;use databaseName;show tables;
MySQL(發(fā)音為"my ess cue el",不是"my sequel")是一種開放源代碼的關(guān)系型數(shù)據(jù)庫管理系統(tǒng)(RDBMS),MySQL數(shù)據(jù)庫系統(tǒng)使用最常用的數(shù)據(jù)庫管理語言--結(jié)構(gòu)化查詢語言(SQL)進行數(shù)據(jù)庫管理。
mysql怎么查看表結(jié)構(gòu)和注釋
MySQL 查看表結(jié)構(gòu)簡單命令。
一、簡單描述表結(jié)構(gòu),字段類型desc tabl_name;
顯示表結(jié)構(gòu),字段類型,主鍵,是否為空等屬性,但不顯示外鍵。
二、查詢表中列的注釋信息
select * from information_schema.columns where table_schema = 'db' #表所在數(shù)據(jù)庫
and table_name = 'tablename' ; #你要查的表
三、只查詢列名和注釋
select column_name,
column_comment from information_schema.columns where table_schema ='db' and
table_name = 'tablename' ;
四、#查看表的注釋
select table_name,table_comment from information_schema.tables where table_schema = 'db' and table_name ='tablename'
ps:二~四是在元數(shù)據(jù)表中查看,我在實際操作中,常常不靈光,不知為什么,有了解的大俠請留印。
五、查看表生成的DDL show create table table_name;
如何看mysql數(shù)據(jù)庫表的編碼格式
一、查看MySQL數(shù)據(jù)庫服務(wù)器和數(shù)據(jù)庫MySQL字符集。
show variables like '%char%';二、查看MySQL數(shù)據(jù)表(table)的MySQL字符集。
show table status from sqlstudy_db like '%countries%';三、查看MySQL數(shù)據(jù)列(column)的MySQL字符集。
show full columns from countries;我們有學習小組也 希望一起學習進步 Oracle-Linux交流 103 382 476
分享名稱:mysql怎么看表的代碼,數(shù)據(jù)庫怎么看表的代碼
標題網(wǎng)址:http://www.dlmjj.cn/article/dsedihj.html