Lets say user A is impersonating as user X using "setuser X".
In sa_conn_info, I still see "Userid = A".
select current user does show "X", but this obviously only works on the connection that issued "setuser X".
Is there any way you can tell from an...
Take this example
create table Test1 (colA integer);
create table Test2 (colB integer);
insert into Test2 (colB)
select new1.colA
from (insert into Test1 (colA) values (1)) referencing (final as new1)
After this tables Test1 and Test2 both cont...
Using v17.0.11.6933
Log in as user DBA.
Run this script from Interactive SQL.
create or replace procedure DBA.CreateTestTable()
sql security invoker
begin
create table Test (
Id integer not null default autoincrement,
Field1 integer...
Using 17.0.10.6230
From Interactive SQL
When I run the following SQL statement (something like a manual cascade delete; and yes I know it's not perfect, but that's beside the point here) on a database with a specific table and FK structure.
WITH RECU...
The question speaks for itself. This is the reproducible script
create table t (c1 int, c2 int);
begin
declare x int = 1;
insert into t (c1, c2) values (x, 1);
insert into t (c1, c2) values (1, 1), (1, 2);
insert into t (c1, c2) values (x, 1...
Ahh... the db service was on an older version then my local Sybase Central version I was testing it from.
This is exactly what I was looking for.
Thanks a lot!
I know I can work around it. It's just that the procedure I'm trying to create contains about 20 tables and is about 3000 lines in total. That makes it "a bit hard", to say the least, if I need to put that in strings and use EXECUTE IMMEDIATE.
I also...
You could check the system tables to see if a table has a column with an autoincrement default
select 1
from sys.systable as t
inner join sys.syscolumn as c
on c.table_id = t.table_id
where t.table_name = 'MyTableName'
a...