I was reading this article:
http://stackoverflow.com/questions/191640/get-null-null-in-sql
And the consensus is that when trying to test equality between two (nullable) sql columns, the right approach is:
where ((A=B) OR (A IS NULL AND B IS NULL))
When A and B are NULL, (A=B) still returns FALSE, since NULL is not equal to NULL. That...
MySqlDataReader rdr = cmd.ExecuteReader();
i have a some information in my mysqldatareader.
how can i show it on our web-pages
I don't know how i can use it .it means mysqldatareader.
also welcome for simple source code.
...
In a single-user desktop application that uses a database for storage, is it necessary to perform the data validation on the database, or is it ok to do it in code? What are the best practices, and if there are none, what are the advantages and disadvantages of each of the two possibilities?
...
I have the following procedure:
CREATE PROCEDURE foo ()
SELECT * FROM fooBar INTO TEMP tempTable;
-- do something with tempTable here
DROP TABLE tempTable;
END PROCEDURE;
What happens if there is an exception before the DROP TABLE is called? Will tempTable still be around after foo exits?
If so, foo could fail the next ...
i want to learn mysql. what i do for learn it.
Currently i Read books on MySql. any other way for learn it
...
I'm trying to update a legacy app that does all its data storage in a hacked-together system of BDE Paradox files. The program works pretty well, under certain narrow conditions, but it has serious performance issues.
I'd like to try and improve things by updating to a better database system. What I need is a local database, preferably...
im trying to find all the mentions for the matched username (sam) from the database text code with following:
$sql = "select * from tweet where feed like '%@sam%'";
this will return all the rows which user have been mention at.
but now the problem is, it also returns rows with @sam3, @sam-dadf or anything that is after @sam..
how c...
So, I asked a question this morning, which I did not phrase correctly, so I got a lot of responses as to why NULL compared to anything will give NULL/FALSE.
My actual question was, what is the time honored fashion in which db guys test inequalities for two columns that can both be NULL. My question is the exact opposite of this questio...
Hey all,
I am learning to be a dba, and the one thing i am missing is good quantity of data to handle a database with. Someone on irc said if you cant handle few terabytes of data then you are still not good enough.
My question is, is there a way i can have terabytes of data from somewhere that i can use it for my learning pu...
I have a Perl script that reads a command file and restarts itself if necessary by doing:
myscript.pl:
exec '/home/foo/bin/myscript.pl';
exit(0);
Now, this works fine except for one issue. The thread that reads the command file does not have access to the DBI handle I use. And over a number of restarts I seem to build up the number o...
Does there exist, or is there an intention to create, a universal database frontend for Python like Perl's DBI? I am aware of Python's DB-API, but all the separate packages are leaving me somewhat aggravated.
...
I have the following data in my db:
ID Name Region
100 Sam North
101 Dam South
102 Wesson East
...
...
...
Now, the region will be different in different languages. I want the Sorting to happen right, based on the display value rather than the internal value.
Any Ideas? (And yeah, sorting in memory using Java is ...
lets say i have a set of users, a set of songs, and a set of votes on each song:
=========== =========== =======
User Song Vote
=========== =========== =======
user1 song1 [score]
user1 song2 [score]
user1 song3 [score]
user2 song1 [score]
user2 song2 [score]
user...
I created them, but I forgot which ones they are.
I just want to
show them.
remove all the constraints on a table.
...
I have a table, and I just want to remove all unique constraints on it.
I tried dropping the table and remaking it , but it won't work. There is still constraint.
...
I want to let my users specify which hours / days they want to be contacted, I though of creating a fixed timetable with the 7 days of the week and let the user specify which hours he has free.
I'm having a little trouble figuring out how I would store that info in the database, can anyone help me with a good table design for this situa...
So for a class I have to turn in my Rails application to my professor. What is the best way to make sure everything goes smoothly when he trys to start it up? Also, is there anyway I can freeze a database and send that with it so he has all of the data I have been using in the application?
Thanks a lot.
...
I have table looks like this
------------------
GeneId | ProteinId
1 | 157
2 | -
3 | 587
4 | 897
5 | -
6 | 120
In realational database, I can treat ProteinId column as INT and use NULL for "-" data. However, I can't find the same option in pytables. Does pytables support NULL...
Lately I've been rethinking a database design I made a couple of months ago. The main reason is that last night I read the databse schema of vBulletin and saw that they use many, MANY, tables.
The current "idea" I'm using for my schema, for instance my log table, is to keep everything in one table by differencing the type of Log with an...
Hi all,
May be its a silly question but I am a bit confused in it, I want to bind a character into sqlite database (neither as varchar, nor as text but as character only)
Hence we can not use
sqlite3_bind_text(insertStmt, 1, @"A", -1, SQLITE_TRANSIENT);
So should I use
sqlite_bind_int(insertStmt,1,65);
or there is a better way t...