Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 how can i prohibit the execution of multi-sql?

Author  Topic 

weboss
Starting Member

1 Post

Posted - 2002-04-10 : 21:44:39
like this :
select * from a
select * from b
select * from c

in code,i want to execute "select * from a",the others is prohibited.
how can i do this?
thank you!

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-04-10 : 21:54:05
Don't pass the statements after the 1st one.

Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2002-04-11 : 04:49:29
They could always get back at you by writing stuff like:

SELECT 'a', a.*, b.*, c.* FROM a LEFT JOIN b ON 1=0 LEFT JOIN c ON 1=0
UNION ALL
SELECT 'b', a.*, b.*, c.* FROM b LEFT JOIN a ON 1=0 LEFT JOIN c ON 1=0
UNION ALL
SELECT 'c', a.*, b.*, c.* FROM c LEFT JOIN a ON 1=0 LEFT JOIN b ON 1=0

 



Go to Top of Page
   

- Advertisement -