returning

Is there an SQL Server equivalent to Oracle's RETURNING statement?

Is there an SQL Server equivalent to Oracle's RETURNING statement? I'm wondering if the OUTPUT clause would help. ...

PL/SQL How return all attributes in ROW

Hi I don't know how I can return all attributes with the RETURNING clause I want something like this: DECLARE v_user USER%ROWTYPE BEGIN INSERT INTO User VALUES (1,'Bill','QWERTY') RETURNING * INTO v_user; END; RETURNING * INTO gets an error , how can I replace * ? Have you any idea ? Thanks for yo...

In postgresql return result of a function in a rule when performing INSERT INTO RETURNING

I have a View that has several fields. When i INSERT INTO a view I run a function based on INSERT parametrs. The function returns a value. How can I retrieve The value from rule? INSERT RETURNING Gives me: ERROR: cannot perform INSERT RETURNING on relation "full_subntes" HINT: You need an unconditional ON INSERT DO INSTEAD rule wi...

Collection should return null or empty upon a Db load ending with no records found?

Hi, If you have a method that queries the Db and returns a collection populated with the records found, what should be returned upon no records found? A new collection with .Count == 0 or null Is there any consensus on this? Or returning null and returning an empty collection should have different meanings? Thanks ...

Variable value assignment using RETURNING clause

I try to do this, but it's a syntax error, what am I doing wrong? declare myid := insert into oameni values(default,'lol') returning id; my table: create table oameni ( id serial primary key, name varhcar(10) ); ...

Returning 2 values from a function | PHP

Is it possible for you to return two values when calling a function that would output the values, for example, I have this: <?php function ids($uid = 0, $sid = '') { $uid = 1; $sid = md5(time()); return $uid; return $sid; } echo ids(); ?> Which will output 1, I want to chose what to ouput, e.g. ids($sid), but i...

(Solved) How to return autoincrement value in insert query in SQLite?

In my project I use System.Data.SQLite. Database has table Tags, which contains autoincrement primary field ID (type Integer). When I write: using (SQLiteCommand command = conn.CreateCommand()) { command.CommandText = "insert into Tags(name) values(@name) returning into @id"; command.Parameters.Add("@id", DbType.Int32).Direction =...

No "add esp,4" for virtual functions returning std::string

I've been looking at DynObj and decided to do my own experimentation with vftables. I'm working with Visual Studio 2010 and created a console main that instantiates an object with a virtual function that returns an std::string. The test code in main attempts to call the object's public virtual function using a pointer obtained from the...