[They all say that select * is not good, ...], Select ..

Source: Internet
Author: User

[They all say that select * is not good, ...], Select ..

If you ask any experienced Database staff, they will tell you that SELECT * FROM... is not a good idea, so it is best not to use it. Today, I spent several hours testing some places where a select * error occurred. Then I found:

Rennie MoodleyTo help me understand what problems I found after the occurrence, help me create the following sample code, then 2 people and Christopher Swart improve the sample and find something more strange, you will also see below.

Sample Setup in the installer, you can use any Sample database that contains all the code to create a sampledb and drag and drop it to the end.

 

  1. USE [master]

  2. GO



  3. -- Create sample database
  4. Create database [SampleDb]
  5. CONTAINMENT = NONE
  6. ON PRIMARY
  7. (NAME = n' sampledb', FILENAME = n' C: \ SQL \ Database Engine \ Data \ SampleDb. mdf ', SIZE = 4096KB, FILEGROWTH = 1024KB)
  8. LOG ON
  9. (NAME = n' SampleDb _ log', FILENAME = n' C: \ SQL \ Database Engine \ log \ SampleDb_log.ldf ', SIZE = 1024KB, FILEGROWTH = 10%)
  10. GO

 

Read the full text

 

 

More java, java learning, and java interview questionsHttp://techfoxbbs.com

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.