Re: Anfängerfrage bzgl. Insert ... Select
Hallo Liesl,
auch Anfänger sind Menschen...
CREATE TABLE tab1 (
feld1 VARCHAR(50)
);
INSERT INTO tab1 VALUE
( 'ABC-' ),
( 'ABC-' ),
( 'ABC-' );
INSERT INTO TAB1 (FELD1)
SELECT CONCAT(FELD1,'123') AS feld1
FROM TAB1 WHERE FELD1 like 'ABC%';
SELECT * FROM tab1
ORDER BY feld1;
+---------+
| feld1 |
+---------+
| ABC- |
| ABC- |
| ABC- |
| ABC-123 |
| ABC-123 |
| ABC-123 |
+---------+
6 rows in set (0.00 sec)
mysql>
Wie immer ist es praktisch ein komplettes Beispiel mit CREATE TABLE plus Testdaten (INSERT) sowie das gewünschte Ergebnis mit einzustellen.
Grüße
Thomas
Subject
Views
Written By
Posted
1931
December 16, 2011 08:30AM
Re: Anfängerfrage bzgl. Insert ... Select
2109
December 16, 2011 11:11AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.