Can this be done in sql server 2000 without dynamic sql?

SelArom

Senior member
Sep 28, 2004
872
0
0
www.djselarom.com
I'm trying to set up a very simple blog application but I want it to have support for multiple blogs running from a single database. a lot of mysql applciations do this, using table prefixes to differentiate between the different installations...

i'm assuming then that these mysql applications all use dynamic sql to generate the queries on the fly so that they can access a specific table... so my first question is this: aren't they not supposed to do that? how do they prevent attacks?

but my main question is, how can I match this functionality using sql server 2000? or can it not even be done?

thanks!
-SelArom
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Why not add a column like BLOG_ID that uniquely identifies the blog the row is associated with? Based on the requirements you listed, there's no reason that table prefixes need to be used.