Getting data from a sql table -


hye there.. got 3 tables looking this:

create table users ( userid int identity, username varchar(50) not null, useraddress varchar(100) not null, userzipcode int not null,  usertown varchar(50) not null,  userphone int not null, comments varchar(max), primary key (userid) )  create table groups ( groupid int identity, groupname varchar(50) not null, groupdiscription varchar(max), primary key (groupid) )  create table usergroups ( userid int not null, groupid int not null, ) 

the last 1 table links between user , group made.
need user data user in selected group..

can anyon me ?

you mean this?

select users.userid,        users.username,        users.useraddress,        users.userzipcode,        users.usertown,        users.userphone,        users.comments users     inner join usergroups on users.userid = usergroups.userid usergroups.groupid = @suppliedgroupid 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -