mysql中查询表的信息 查询mysql表字段信息的sql语句 SHOW DATABASES //列出 MySQL Server 数据库. SHOW TABLES [FROM db_name] //列出数据库数据表. SHOW CREATE TABLES tbl_name //导出数据表结构. SHOW TABLE STATUS [FROM db_name] //列出数据表及表状态信息. SHOW COLUMNS FROM tbl_name [FROM db_name] //列出资料表字段 SH
MySQL性能优化--优化数据库结构之优化数据大小 By:授客 QQ:1033553122 尽量减少表占用的磁盘空间.通常,执行查询期间处理表数据时,小表占用更少的内存. 表列 l 尽可能使用最效率(最小)的数据类型.比如,使用更小的整型以便于获取更小的表.相比INT,MEDIUMINT 通常是个更好的选择,因为MEDIUMINT列少使用25%的空间. l 尽可能的定义列为NOT NULL,这有利于更好的使用索引,可以让sql操作更快. 行格式 l MySQL 5.7.8及以前
1.distinct select count(distinct CName) from teble select count(CName) from (select distinct CName from Course) as temp SELECT DISTINCT text_zhcn FROM dms_menuconfig -- 去重查询表中数据 select DISTINCT(user_id) from user_info where children_merchant_id='kuai
C# DateTime的11种构造函数 别的也不多说没直接贴代码 using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; namespace