当前位置:网站首页>Database query user mailbox
Database query user mailbox
2022-06-13 01:15:00 【Roam-G】
1938 · Query user mailbox
database
users Table records the user name (username)、 password (password) And mailbox (email), Now users "zhangsan" Log in by entering a user name and password
Please write SQL sentence , According to the user name (zhangsan) And password (zs789852), Query the user "zhangsan" The mailbox of .
The table definition : users ( User table )
| Name | type | notes |
|---|---|---|
| username | varchar | user name ( Primary key ) |
| password | varchar | User password |
| varchar | User mailbox |
Tips :
To return is username and email
Examples
Examples 1:
Table content : users
| username | password | |
|---|---|---|
| zhangsan | zs789852 | [email protected] |
| lisi | ls654852 | [email protected] |
| wanger | we951753 | [email protected] |
| mazouri | mzr753951 | [email protected] |
| xiangfeitian | xft159357 | [email protected] |
Running your SQL After statement , Table should return :
| username | |
|---|---|
| zhangsan | [email protected] |
Examples 2:
Table content : users
| username | password | |
|---|---|---|
| zhangsan | zs789852 | [email protected] |
| lisi | ls654852 | [email protected] |
| wanger | we951753 | [email protected] |
Running your SQL After statement , Table should return :
| username | |
|---|---|
| zhangsan | [email protected] |
1. Create database
DROP DATABASE IF EXISTS judge;
CREATE DATABASE judge;
use judge;
DROP TABLE IF EXISTS users;
CREATE TABLE `users`(
`username` VARCHAR(50) NOT NULL,
`password` VARCHAR(16) NOT NULL,
`email` VARCHAR(50) NOT NULL,
PRIMARY KEY ( `username` )
);
2. insert data

3. Query data

边栏推荐
- [JS component] create a custom horizontal and vertical scroll bar following the steam style
- How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of DBCD, ROC, vroc, Cr and psy index strategy income
- 304. Merge two ordered arrays
- Install pycharm process
- Alexnet implements image classification of caltech101 dataset (pytorch Implementation)
- 切线与切平面
- Expression tree - medium order printout
- leetcode. 151. flip the words in the string
- 五篇经典好文,值得一看(2)
- MySQL index
猜你喜欢
![[projet cs144 de Stanford Computing Network] lab1: Stream reassembler](/img/7b/fad18b68a6ee30d1dec4dad6273b98.png)
[projet cs144 de Stanford Computing Network] lab1: Stream reassembler

Alexnet实现Caltech101数据集图像分类(pytorch实现)

How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of BBI, MTM, obv, CCI and priceosc indicators

Leetcode-19- delete the penultimate node of the linked list (medium)

Realization of flip animation

Status of the thread

Leetcode question brushing 02 linked list operation

Traditional machine learning classification model predicts the rise and fall of stock prices

A problem discovery and attempted solution to the strange stop of server script

ES6解构赋值
随机推荐
Tkinter library installation
Alexnet实现Caltech101数据集图像分类(pytorch实现)
Characteristics of transactions - persistence (implementation principle)
Binary tree - right view
About_ int128
工作与生活
[JS component] custom paging
Jenkins持续集成操作
How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic benefits of ASI, VR, arbr, DPO and trix indicators
Polymorphism and virtual function
Alexnet implements image classification of caltech101 dataset (pytorch Implementation)
leetcode 206. Reverse linked list
[JS component] create a custom horizontal and vertical scroll bar following the steam style
Leetcode question brushing 03 stack
Memory learning book reference
Application advantages of 5g industrial gateway in coal industry
Leetcode-11- container with the most water (medium)
Leetcode-19- delete the penultimate node of the linked list (medium)
Bubble sort - alternate sort at both ends
Install pycharm process