求几句SQL语句,谢谢谢谢。。。。
时间:2011-12-25
来源:互联网
表名theid
id name age
1 张飒 19
2 李思 20
3 18
4 赵柳 22
5 孙二
6 张飒 15
7 王二 17
想删除掉name age 没有参数的整条数据需要结果如下:
id name age
1 张飒 19
2 李思 20
4 赵柳 22
6 张飒 15
7 王二 17
然后想随机对数据库进行重新排列(以下虚拟模仿值,不要求完全按这随机的顺序):
id name age
1 王二 17
2 李思 20
3 张飒 19
4 张飒 15
5 赵柳 22
作者: safjudsoi45 发布时间: 2011-12-25
select * from theid where name is not null and age is not Null order by rand()
作者: ACMAIN_CHM 发布时间: 2011-12-25
'截至2011-12-25 20:40:05 用户结帖率0.00%
当您的问题得到解答后请及时结贴.
http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
http://topic.csdn.net/u/20100428/09/BC9E0908-F250-42A6-8765-B50A82FE186A.html
http://topic.csdn.net/u/20100626/09/f35a4763-4b59-49c3-8061-d48fdbc29561.html
8、如何给分和结贴?
http://community.csdn.net/Help/HelpCenter.htm#结帖
作者: ACMAIN_CHM 发布时间: 2011-12-25
where name is not null or age is not Null
order by rand()
作者: pangpang514 发布时间: 2011-12-25
where name is null or age is Null
order by rand()
作者: pangpang514 发布时间: 2011-12-25
SQL code
select * from theid
where name is not null and age is not Null
order by rand()
order by rand()
这句我是要把数据库的内容变更掉,不是查询出来的结果,该怎么写?
作者: ccccdddeeeaaabb 发布时间: 2011-12-25
delete from theid
where name is null or age is Null
order by rand()
order by rand()
这句我是要把数据库的内容变更掉,不是查询出来的结果,该怎么写?
作者: ccccdddeeeaaabb 发布时间: 2011-12-25
SQL code
select * from theid
where name is not null and age is not Null
order by rand()
还有第一句也不行。。。
我这边要这样写才行是为什么呢?
select * from theid
where name ='' or age = ''
作者: ccccdddeeeaaabb 发布时间: 2011-12-25
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28