Re: Insert into com Condição IF
SELECT * FROM users;
+---------+-------+-------+-------+
| usersID | name | flag1 | flag2 |
+---------+-------+-------+-------+
| 1 | harry | 0 | 0 |
| 2 | bill | 0 | 0 |
+---------+-------+-------+-------+
INSERT INTO users SELECT 3,'jorge',CASE WHEN 1=1 THEN 0 ELSE 1 END,1;
SELECT * FROM users;
+---------+-------+-------+-------+
| usersID | name | flag1 | flag2 |
+---------+-------+-------+-------+
| 1 | harry | 0 | 0 |
| 2 | bill | 0 | 0 |
| 3 | jorge | 0 | 1 |
+---------+-------+-------+-------+
Subject
Views
Written By
Posted
9466
August 26, 2011 09:24AM
Re: Insert into com Condição IF
3095
November 21, 2011 05:51AM
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.