答案:运行命令 describe table_name;
问题8:如何删除表?
答案:运行命令 drop table table_name;
问题9:如何删除数据库?
答案:运行命令 drop database database-name;
问题10:如何查看表内所有数据?
答案:运行命令 select * from table_name;
问题11:如何从表(比如 oc_users )中获取一个 field 对象(比如 uid)的所有数据?
答案:运行命令 select uid from oc_users;
问题12:假设你有一个名为 ‘xyz’ 的表,它存在多个字段,如 ‘createtime’ 和 ‘engine’ 。名为 engine 的字段由 ‘Memoty’ 和 ‘MyIsam’ 两种数值组成 。如何只列出 ‘createtime’ 和 ‘engine’ 这两列并且 engine 的值为 ‘MyIsam’?
答案:运行命令 select create_time, engine from xyz where engine = ”MyIsam”;
问题13:如何列出表 ‘xrt’ 内 name 域值为 ‘tecmint’ , web_address 域值为 ‘tecmint.com’ 的所有数据?
答案:运行命令 select * from xrt where name = “tecmint” and web_address = “tecmint.com”;
问题14:如何列出表 ‘xrt’ 内 name 域值不为 ‘tecmint’,web_address 域值为 ‘tecmint.com’ 的所有数据?
答案:运行命令 select * from xrt where name != "tecmint" and web_address = "tecmint.com";
问题15:如何知道表内行数?
答案:运行命令 select count(*) from table_name;
【mysql怎么查找数据库 mysql查找数据库名】关于mysql怎么查找数据库和mysql查找数据库名的介绍到此就结束了 , 不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。
- mysql游标和存储过程是什么 mysql游标表名为变量
- 如何使用cmd命令行提示符登录mysql服务器 cmd中登陆mysql
- mysql怎么设置时区 mysql时间显示设置
- 招聘要精通mysql
- mysql 65535 8192 限制 mysql限制资源使用
- mysql有topn
- mysql协议包解析 mysqlicp协议
- mysql子查询和连接查询 mysql子查询插入
- Mysql使用索引查询 mysql使用round
- 云服务器游戏出现黑屏问题怎么解决? 云服务器游戏黑屏怎么办
