recherche

Maison  >  Questions et réponses  >  le corps du texte

Requête d'adresse e-mail manquante MySQL

<p> 我有一个表(datas): <table class="s-table"> <thead> <tr> <th>line</th> <th>account</th> <th>name</th> <th>email</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>1000</td> <td>Reyes VonRueden Sr.</td> <td>sharon51@yahooo.com</td> </tr> <tr> <td>1</td> <td>1000</td> <td>Dr. Elena Bartell V</td> <td></td> </tr> <tr> <td>1</td> <td>1000</td> <td>Lucio Wehner</td> <td></td> </tr> <tr> <td>2</td> <td>1000</td> <td>April Hansen</td> <td></td> </tr> <tr> <td>2</td> <td>1000</td> <td>Amy Waelchi</td> <td>hegmann.khalid@yahooo.com</td> </tr> <tr> <td>2</td> <td>1000</td> <td>Tremaine Cassin</td> <td></td> </tr> <tr> <td>3</td> <td>1000</td> <td>Susana White Jr.</td> <td>jfay@hotmailses.com</td> </tr> <tr> <td>3</td> <td>1000</td> <td>Roxane Hoeger</td> <td></td> </tr> <tr> <td>3</td> <td>1000</td> <td>Prof. Eric Boehm</td> <td></td> </tr> <tr> <td><strong>4</strong></td> <td><strong>1000</strong></td> <td><strong>Miles Considine</strong></td> <td>** **</td> </tr> <tr> <td><strong>4</strong></td> <td><strong>1000</strong></td> <td><strong>Araceli Effertz</strong></td> <td>** **</td> </tr> <tr> <td><strong>4</strong></td> <td><strong>1000</strong></td> <td><strong>Prof. Adolph Pacocha</strong></td> <td>** **</td> </tr> <tr> <td>5</td> <td>1000</td> <td>Prof. Rafaela Hills</td> <td>sydney20@gradyesses.com</td> </tr> <tr> <td>5</td> <td>1000</td> <td>Delta Becker</td> <td></td> </tr> <tr> <td>5</td> <td>1000</td> <td>Aditya Ratke</td> <td>julian28@yahooes.com</td> </tr> <tr> <td>6</td> <td>1000</td> <td>Miss Elaina Aufderhar Sr.</td> <td>royal.predovic@connellyses.com</td> </tr> <tr> <td>6</td> <td>1000</td> <td>Miss Stephanie Russel IV</td> <td></td> </tr> <tr> <td>6</td> <td>1000</td> <td>Dr. Ramiro Marks IV</td> <td>wrice@yahooes.com</td> </tr> <tr> <td><strong>7</strong></td> <td><strong>1000</strong></td> <td><strong>Garfield Kozey</strong></td> <td>** **</td> </tr> <tr> <td><strong>7</strong></td> <td><strong>1000</strong></td> <td><strong>Gene Hilpert</strong></td> <td>** **</td> </tr> </tbody> </table> </p><p>线路和账户字段清楚地定义了一个客户。</p><p> 姓名字段是一个工人。</p><p> 我正在寻找没有电子邮件地址的客户(线路+账户)。</p><p> 在这种情况下,结果是:4-1000和7-1000。</p> <p>我可以用两个查询和Excel来解决这个问题,但在MySQL中会更快。</p> <p>如果您能帮忙,谢谢;)</p>
P粉094351878P粉094351878478 Il y a quelques jours431

répondre à tous(1)je répondrai

  • P粉186904731

    P粉1869047312023-08-15 00:44:32

    C'est la requête que vous recherchez.

    SELECT * FROM customer WHERE email IS NULL or email = '';

    Cette requête vous donnera tous les champs sans e-mail.

    Si vous recherchez des enregistrements sans adresse e-mail valide, veuillez utiliser la requête ci-dessous.

    SELECT * FROM customer WHERE email not like '%@%';

    répondre
    0
  • Annulerrépondre