sql-match-all Questions
13
Solved
Assuming I have the tables student, club, and student_club:
student {
id
name
}
club {
id
name
}
student_club {
student_id
club_id
}
I want to know how to find all students in both the soc...
Justificatory asked 9/9, 2011 at 16:54
3
Solved
Suppose it's a website that sells photo cameras. Here are my entities (tables):
Camera: A simple camera
Feature: A feature like: 6mp, max resolution 1024x768,
The thing is between cameras and f...
Calx asked 1/2, 2012 at 20:33
6
Solved
Let's say I have a two-column table like this:
userid | roleid
--------|--------
1 | 1
1 | 2
1 | 3
2 | 1
I want to get all distinct userids that have roleids 1, 2 AND 3. Using the above exampl...
Kaka asked 25/1, 2009 at 1:1
2
Solved
I have two tables in a MySQL database, Locations and Tags, and a third table LocationsTagsAssoc which associates the two tables and treats them as a many-to-many relationship.
Table structure is a...
Daft asked 8/6, 2010 at 22:30
8
Solved
I have a StackOverflow-like tagging system for a database I'm working on. And I'm writing a stored procedure that looks for results based on an undetermined number of tags in a WHERE clause. There ...
Cronus asked 22/8, 2009 at 23:55
9
Solved
Say I have a table that has items and attributes listed like,
frog green
cat furry
frog nice
cat 4 legs
frog 4 legs
From the items column I want to select unique objects that have both the green...
Sententious asked 29/5, 2009 at 19:29
2
Solved
In the following one to many
CREATE TABLE source(id int, name varchar(10), PRIMARY KEY(id));
CREATE TABLE params(id int, source int, value int);
where params.source is a foreign key to source.id...
Bookrest asked 16/10, 2008 at 18:50
1
© 2022 - 2024 — McMap. All rights reserved.