首页 > 解决方案 > 使用表“帐户”中的用户名获取表“位置”SQL 的值

问题描述

这是我创建帐户的代码和评论中的值

"INSERT INTO Accounts VALUES('"+
                        txtuser.Text + "','" + txtpass.Text +"')"+

"INSERT INTO Location VALUES('" +
                        txtcity.Text + "','" + txtprovince.Text + "','" + txtcountry.Text + "')"

//txtuser.Text = "Dory"
//txtpass.Text = "FINDME!"
//txtcity.Text = "Ermita"
//txtprovince.Text = "Manila"
//txtcountry.Text = "Philippines"

问题 如何通过基于表帐户的用户值来获取表位置的值?例如: DORY 位置是 Ermita,Manila,Phillipines

我这里的 sql 代码不起作用

SELECT *
FROM Accounts,
     Email
WHERE Accounts.username = 'Dory'

但是我的代码不能正常工作

标签: c#sqlwinformsmdf

解决方案


推荐阅读