差异赌注。选择*并在sql查询中选择列名 [英] diff bet. select * and select column name in sql query

查看:65
本文介绍了差异赌注。选择*并在sql查询中选择列名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我通过以下有趣的问题遇到了什么?有什么区别:

Hello,

I came across through below interesting question? What is the difference between:

select * from employee



and

select empid,empname,empcity,empsalary from employee



谢谢。


Thanks.

推荐答案

这听起来有点像家庭作业....



无论如何,有很多不同之处。从我的头脑中命名一些:

< lu>
  • 列数不同
This sounds a bit like a homework....

Anyhow, there are quite a few differences. To name some from the top of my head:
<lu>
  • the amount of columns is different
  • 返回的相同列的顺序可能不同
  • 第二个可能由于错误输入的列名而失败
  • 由于大小写混合字符列名称,第二个可能会失败
  • 第二个可能使用(不同)索引
  • 第二个可能会返回结果而根本不会访问员工表
  • 传输到客户端的数据量可能不同


先说google ..当你遇到问题或疑问时



您的解决方案就在这里。



选择* Vs选择列名 [ ^ ]
Say google first.. When you have an issue or doubt

Your solution is here.

Select * Vs Select Column Name[^]


这篇关于差异赌注。选择*并在sql查询中选择列名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆