Q
Problem solve Get help with specific problems with your technologies, process and projects.

What is the difference between these two queries?

What is the difference betwen using:
 *) SELECT 'HI' BOOK,EMPLOYEEID FROM EMPLOYEES UNION ALL SELECT 'HI'BOOK ,ORDERID FROM ORDERS *) SELECT BOOK ='HI',EMPLOYEEID FROM EMPLOYEES UNION ALL SELECT BOOK='HELLO',ORDERID FROM ORDERS
BOOK, as you know, is not in the ORDERS or EMPLOYEES tables in the NORTHWIND database.

There is none. Both will give you a column name for the constant of 'HI' that is called BOOK.

 

For More Information

Dig Deeper on Microsoft SQL Server Installation

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close