Click here to Skip to main content
15,885,720 members
Home / Discussions / Database
   

Database

 
AnswerRe: Finding "Missing" ID Numbers in Table (SQL Server 2005) Pin
Eddy Vluggen14-Jun-12 0:59
professionalEddy Vluggen14-Jun-12 0:59 
QuestionView might cause corruption? Pin
kmoorevs13-Jun-12 5:35
kmoorevs13-Jun-12 5:35 
AnswerRe: View might cause corruption? Pin
David Mujica13-Jun-12 5:56
David Mujica13-Jun-12 5:56 
AnswerRe: View might cause corruption? Pin
Pete O'Hanlon13-Jun-12 5:57
mvePete O'Hanlon13-Jun-12 5:57 
AnswerRe: View might cause corruption? Pin
Corporal Agarn13-Jun-12 5:57
professionalCorporal Agarn13-Jun-12 5:57 
AnswerRe: View might cause corruption? Pin
Mycroft Holmes13-Jun-12 14:52
professionalMycroft Holmes13-Jun-12 14:52 
GeneralRe: View might cause corruption? Pin
kmoorevs14-Jun-12 4:20
kmoorevs14-Jun-12 4:20 
QuestionMySQL Pin
klaydze12-Jun-12 21:54
klaydze12-Jun-12 21:54 
Hi All,

Can someone explain why MySql treat the two sql statement below different?

First Query (without inner join)
C#
MySqlConnection conn = new MySqlConnection("server=localhost;database=db_test;uid=root;password=1234567");
MySqlCommand dbCommand = new MySqlCommand("select * from useraccess_privileges", conn);
dbCommand.CommandType = CommandType.Text;
if (dbConn.DBConnect.State == ConnectionState.Closed)
	dbConn.DBConnect.Open();
DataTable dtData = new DataTable();
dtData.Load(dbCommand.ExecuteReader());

C#
Result: dtData will return 7 row count


Second Query (with inner join)

C#
MySqlConnection conn = new MySqlConnection("server=localhost;database=db_test;uid=root;password=1234567");
MySqlCommand dbCommand = new MySqlCommand("select t1.*, t2.MenuName from user_access t1 inner join useraccess_privileges t2 on t1.UserName = t2.UserName", conn);
dbCommand.CommandType = CommandType.Text;
if (dbConn.DBConnect.State == ConnectionState.Closed)
	dbConn.DBConnect.Open();
DataTable dtData = new DataTable();
dtData.Load(dbCommand.ExecuteReader());

C#
Result: dtData will return 1 row count


Second query should return 7 rows also since i just reference it to other table to get the full name of the specific username.

Thanks
if(you type your code here) {
Messagebox.Show("You help me a lot!");
}
else {
You help me = null;
}

AnswerRe: MySQL Pin
Bernhard Hiller12-Jun-12 23:34
Bernhard Hiller12-Jun-12 23:34 
GeneralRe: MySQL Pin
klaydze13-Jun-12 1:33
klaydze13-Jun-12 1:33 
QuestionRemove a noise word in a SQL Server 2008 database Pin
Fernando A. Gomez F.12-Jun-12 13:55
Fernando A. Gomez F.12-Jun-12 13:55 
AnswerRe: Remove a noise word in a SQL Server 2008 database Pin
Bernhard Hiller13-Jun-12 0:00
Bernhard Hiller13-Jun-12 0:00 
GeneralRe: Remove a noise word in a SQL Server 2008 database Pin
Fernando A. Gomez F.13-Jun-12 5:05
Fernando A. Gomez F.13-Jun-12 5:05 
AnswerRe: Remove a noise word in a SQL Server 2008 database Pin
Eddy Vluggen13-Jun-12 1:24
professionalEddy Vluggen13-Jun-12 1:24 
GeneralRe: Remove a noise word in a SQL Server 2008 database Pin
Fernando A. Gomez F.13-Jun-12 5:06
Fernando A. Gomez F.13-Jun-12 5:06 
GeneralRe: Remove a noise word in a SQL Server 2008 database Pin
Eddy Vluggen13-Jun-12 5:48
professionalEddy Vluggen13-Jun-12 5:48 
AnswerRe: Remove a noise word in a SQL Server 2008 database Pin
Bernhard Hiller13-Jun-12 4:40
Bernhard Hiller13-Jun-12 4:40 
GeneralRe: Remove a noise word in a SQL Server 2008 database Pin
Fernando A. Gomez F.13-Jun-12 5:07
Fernando A. Gomez F.13-Jun-12 5:07 
GeneralRe: Remove a noise word in a SQL Server 2008 database Pin
Fernando A. Gomez F.13-Jun-12 5:08
Fernando A. Gomez F.13-Jun-12 5:08 
QuestionSQL Compound Primary Keys Pin
Kevin Marois12-Jun-12 11:36
professionalKevin Marois12-Jun-12 11:36 
AnswerRe: SQL Compound Primary Keys Pin
PIEBALDconsult12-Jun-12 16:45
mvePIEBALDconsult12-Jun-12 16:45 
GeneralRe: SQL Compound Primary Keys Pin
Kevin Marois12-Jun-12 18:13
professionalKevin Marois12-Jun-12 18:13 
GeneralRe: SQL Compound Primary Keys Pin
PIEBALDconsult13-Jun-12 4:10
mvePIEBALDconsult13-Jun-12 4:10 
GeneralRe: SQL Compound Primary Keys Pin
Kevin Marois13-Jun-12 6:33
professionalKevin Marois13-Jun-12 6:33 
JokeRe: SQL Compound Primary Keys Pin
Eddy Vluggen13-Jun-12 1:21
professionalEddy Vluggen13-Jun-12 1:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.