Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 11 lis 2015 · You could use the SQL%ROWCOUNT Oracle variable: UPDATE table1 SET field2 = value2, field3 = value3 WHERE field1 = value1; IF (SQL%ROWCOUNT = 0) THEN INSERT INTO table (field1, field2, field3) VALUES (value1, value2, value3); END IF;

  2. 29 kwi 2015 · IF EXISTS (select * from users where username = 'something') THEN. update users set id= 'some' where username = 'something'; ELSE. insert into users (username) values ('something'); END IF; end $$. delimiter ; and call it like this: call select_or_insert();

  3. 19 lip 2022 · update customers_dim cd set ( full_name, update_datetime ) = ( select cs.full_name, systimestamp from customers_stage cs where cs.customer_id = cd.customer_id ) where exists ( select null from customers_stage ce where ce.customer_id = cd.customer_id )

  4. 5 gru 2019 · I come from using mostly ms sql, but also sybase and mysql. Now I am working in a company where they use oracle, so I am learning a new dialect. I use exists to determine if I need to do an update or insert in ms sql. IF EXISTS(SELECT 'True' FROM TABLE WHERE COLUMN = @ID) BEGIN UPDATE TABLE; END ESLE BEGIN INSERT INTO TABLE; END

  5. This statement is equivalent to: update people_target t set (t.first_name, t.last_name) = ( select s.first_name, s.last_name from people_source s where s.person_id = t.person_id ) where exists ( select null from people_source s where s.person_id = t.person_id). MERGE INTO people_target pt. USING people_source ps.

  6. The WHERE clause, if given, specifies the conditions that identify which rows to update. With no WHERE clause, all rows are updated. If the ORDER BY clause is specified, the rows are updated in the order that is specified. The LIMIT clause places a limit on the number of rows that can be updated.

  7. 1 lut 2010 · How do I update a table and set different values upon the condition evaluating to True. For instance : UPDATE Table SET A = '1' IF A > 0 AND A < 1 SET A = '2' IF A > 1 AND A < 2 WHERE A IS NOT NULL;

  1. Ludzie szukają również