![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据库
whzlong328
这个作者很懒,什么都没留下…
展开
-
常用的T-SQL
1、列出数据库里所有的表名select name from sysobjects where type=U 2、列出表里的所有的元素select name from syscolumns where id=object_id(TableName)3、随机取出10条数据select top 10 * from tablename order by newid()4、随机选择记原创 2009-07-28 17:01:00 · 339 阅读 · 0 评论 -
MySQL----实用SQL
1. 备份单个表 mysqldump -u root -S /tmp/mysql.sock 【数据库名】 【表名】 > /root/表名.sql2.恢复单个表 mysql -u root -S /tmp/mysql.sock 【数据库名】3. 删除表的字段原创 2011-07-15 20:22:22 · 307 阅读 · 0 评论 -
Mysql远程访问权限赋予
以下是远程访问数据库时,给数据库赋予权限方法 grant all privileges on 数据库名.* to 用户名 identified by '密码' with grant option; grant all privileges on kmproject_new.* to km@192.168.129.56 identified by 'km' with grant原创 2011-06-08 15:58:00 · 387 阅读 · 0 评论