views getting created even though underlying select has syntax error

Database

views getting created even though underlying select has syntax error

Hi all

I have a scenario where I am trying to create a view and it is suceeding even though we have a syntax error in the underlying select statement. Few examples below

create view nkshar.test_view
as
sel
queryid,
errortext
sessionid
from dbc.dbqlogtbl with check option;
create view nkshar.test_view
as
sel
queryid,
errortext sessionid
from dbc.dbqlogtbl with check option;

As you can see. Both of these have comma (,) missing in the select portion but the views get created without the column errortext. Can someone explain about this behaviour? Shouldnt this be failing in the syntaxer?

Thanks

1 REPLY

Re: views getting created even though underlying select has syntax error

Hi.

There is not syntax error: you are giving the column 'errortext' the name (title) sessionid.

Cheers.

Carlos.