表1包含ColumnA,表2包含ColumnA和ColumnB。
如何删除(删除)表2中包含两个表中的ColumnA值的行?
答案 0 :(得分:2)
从table2中删除在table1中也找到ColumnA值的行:
void onVerifyCodeBtnPressed(BuildContext context) async { // added async
if (_formKey.currentState.validate()) {
String email = _emailController.text;
String passwd = _passwdController.text;
Future<JsonEnvelop> envelop;
try {
envelop = await RemoteUserServices.loginUser( // added `await`
email, passwd);
} on SocketException {
throw Exception('Internet is down');
}
答案 1 :(得分:2)
使用EXISTS
delete t
from table2 t
where exists
(
select 1 from table1 t1 where t1.columna=t.columna
)