SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 CREATE TABLE () ... SELECT and strange results
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

duf
Starting Member

37 Posts

Posted - 07/25/2012 :  02:55:26  Show Profile  Reply with Quote
Why in the query result is more column than the declared in the query?
CREATE TABLE FAKTURA (KOD VARCHAR(8),KRAJ VARCHAR(2),WARTOSC DECIMAL(9,2) UNSIGNED,WAGA DECIMAL(5,2) UNSIGNED,ILOSC SMALLINT UNSIGNED)
SELECT KOD,KRAJ,SUM(WARTOSC),SUM(WAGA),SUM(ILOSC) FROM TEMP GROUP BY KOD,KRAJ


Result:
http://vlep.pl/1w5ilx.jpg

webfred
Flowing Fount of Yak Knowledge

Germany
8513 Posts

Posted - 07/25/2012 :  02:59:31  Show Profile  Visit webfred's Homepage  Reply with Quote
Is this MS SQL Server?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

duf
Starting Member

37 Posts

Posted - 07/25/2012 :  03:01:25  Show Profile  Reply with Quote
MySQL Server. ;-)
Go to Top of Page

lionofdezert
Aged Yak Warrior

Pakistan
864 Posts

Posted - 07/25/2012 :  03:35:37  Show Profile  Visit lionofdezert's Homepage  Send lionofdezert a Yahoo! Message  Reply with Quote
These are Microsoft SQL Server specific forums. Please post your question on MYSql forums.

--------------------------
http://connectsql.blogspot.com/
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000