Learning SQL Server - Efficient Query Writing Strategy - Gift Book(blog.sqlauthority.com)

submitted by pinaldavepinaldave(9662) 9 months, 21 days ago

Some people may push back on this next technique or misunderstand until getting to the very end. The goal is to have fewer errors as you write complex queries more quickly by making sure the easy stuff works first.

2 comments |category: |Views: 80

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by dpetersondpeterson(4397) 9 months, 20 days ago 0

I think that using select * to get table column names is bad practice. If you're using Sql Server as it shows in that post you should use the sp_columns stored procedures (which also prints column type information).
Other RDBMS systems may have other such shortcuts.

Reply

posted by vijaystvijayst(1311) 9 months, 18 days ago 0

Interesting Quiz. Answer should be: Square brackets are required when the column name matches a keyword in SQL. I wonder if it is just a single option. The other option where a column name matches a table name looks closely feasible. Anyone knows the answer?

Reply

information Login or create an account to comment on this story