Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 CREATE TABLE () ... SELECT and strange results

Author  Topic 

duf
Starting Member

39 Posts

Posted - 2012-07-25 : 02:55:26
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:
[url]http://vlep.pl/1w5ilx.jpg[/url]

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-07-25 : 02:59:31
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

39 Posts

Posted - 2012-07-25 : 03:01:25
MySQL Server. ;-)
Go to Top of Page

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2012-07-25 : 03:35:37
These are Microsoft SQL Server specific forums. Please post your question on MYSql forums.

--------------------------
http://connectsql.blogspot.com/
Go to Top of Page
   

- Advertisement -