Autor Beitrag
delphijanka
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151

WinXP
D 2009 Arc., Java, C
BeitragVerfasst: Mi 02.09.09 14:55 
Hallo.

Wie kann ich bei der SELECT-Abfrage eigene Spalte mit festem Wert (für alle Zeilen) hinzufügen?

Also:

SELECT t.attribut, <'fester Wert'>
FROM Tabelle t

Danke.
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mi 02.09.09 15:11 
Ganze genau so :lol:

ausblenden SQL-Anweisung
1:
select 123 as "test" from dual;					

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
DeddyH
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 02.09.09 15:11 
Indem Du einfach den festen Wert mit angibst.
ausblenden SQL-Anweisung
1:
2:
SELECT Feld1, 'Blabla' AS Festwert, Feld2
FROM Tabelle
delphijanka Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 151

WinXP
D 2009 Arc., Java, C
BeitragVerfasst: Mi 02.09.09 15:15 
Danke.