Tagged Questions
0
votes
0answers
13 views
developing procedure in sql for global use
what type of complex procedure can i develop in SQL which will make others work easy as well ,
like in Java , i had developed a program for FTP so that anyone can import this program and can use it ...
0
votes
1answer
31 views
Using a keywords table with multiple other tables
Using MySQL
I need help determining how to model a Keywords table to three different tables (Products, Certifications, and Exams) - I have included my model which is using what I refer to as ...
0
votes
1answer
41 views
Query that ranks students order by marks and give the position of student even when there are students with equal marks
I need an sql that will rank students order by marks scored in a specific examtyp e.g CAT1 and give exact position even if the students have equal marks e.g in this sample data admNo 2525 and admNo ...
-1
votes
1answer
48 views
Why is this mysql query wrong? [closed]
I try to run the following sql query in mysql
SET @rank:=0;
WITH TEMP
(
SELECT @rank := @rank + 1 AS ROW_ID , UUID() as RANDOM_VALUE,D.*
FROM house_information_new D
ORDER BY ...
0
votes
0answers
15 views
Range query from month and year [migrated]
I have a table like this:
ID month year content
1 4 2013 xxxxx
2 5 2013 yyyyy
3 6 2013 zzzzz
4 8 2014 fffff
I want to query it based on a year ...
0
votes
1answer
57 views
Complicated join with where clause
I have four tables:
sales
sales_thumbs
sales_images
sales_sizes
sales table:
+--------------+---------------------+------+-----+---------+----------------+
| Field | Type | ...
1
vote
1answer
29 views
Trigger doesn't run when value of a column changes from null to 1
I have this trigger:
delimiter $$
create trigger tr
after update on t1
for each row
begin
if new.col1 !=old.col1
then update t2 set col2 =1 where t2.col3=t1.col3;
end if;
end
$$
This ...
-5
votes
2answers
97 views
Challenge: Build MySQL table that's not in first normal form [closed]
I have read numerous books and articles about database design and SQL in which it is said that a database should be in first normal form (1NF). (Some then go on to describe situations in which it may ...
0
votes
0answers
11 views
Vote to a db server using session key
I do not know if this is the right stackexchange site to ask this question, but I believe that is relevant.
I am trying to implement an e-voting protocol. At some point the protocol says that server 1 ...
2
votes
2answers
42 views
What can I do to make mysql use the expected indices?
What can I do to make mysql use the expected indices?
I've got 4 tables, two containing resources, and the others containing historical changes.
One pair uses indexes correctly, the other doesn't, ...
1
vote
2answers
52 views
Challenge. Split database 500 records in two smaller datasets, randomly
I have a database with 500 records. I want to split these records to 75% and 25% *randomly*in order to use the different datasets for training and testing to machine learning algorithms. Does anyone ...
0
votes
0answers
21 views
MySQL not using resources?
Hi I have a decent setup: 16Gb RAM and a 4 cored CPU. I'm on a 64-bit Windows OS with MySQL Ver 14.14 Distrib 5.5.24 Win64 (x86). I am also using InnoDB.
The query I am using to test the setup is a ...
0
votes
2answers
54 views
Database search with multi joins
I have a MySQL database and I want to perform a little bigger search.
I have about 10k records in one of the tables and It's expected to grow, but slowly.
The biggest problem is that to perform the ...
1
vote
1answer
80 views
Separating tables vs having one table
At the moment I have a table setup that looks somewhat like this:
create table tbl_locationcollections
(
id int(11) PRIMARY KEY IDENTITY, --(Primary Key),
name varchar(100) not null,
...
0
votes
1answer
30 views
MySQL stored routine performance while using PREPARE
Instead of maintaining stored routines for each database in my current environment i have decided to create separate database just for stored routines storage. Mainly i am using them for reporting. ...