当前位置:网站首页>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

边栏推荐
- Unity calls alertdialog
- ES6 deconstruction assignment
- Wikipedia API User Guide
- 软件测试的几种分类,一看就明了
- Common skills for quantitative investment - drawing 3: drawing the golden section line
- Leetcode-17- letter combination of phone number (medium)
- Characteristics of transactions - persistence (implementation principle)
- Remove duplicates from an ordered array
- Exercise 5.14 input n strings, arrange them in alphabetical order and output them.
- How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of vrsi, bbiboll, WR, bias and RSI indicators
猜你喜欢

五篇经典好文,值得一看(2)
![[JS component] dazzle radio box and multi box](/img/2a/00620bee312972db93e1db4313385f.jpg)
[JS component] dazzle radio box and multi box

The tle4253gs is a monolithic integrated low dropout tracking regulator in a small pg-dso-8 package.

Realization of flip animation

Alexnet implements image classification of caltech101 dataset (pytorch Implementation)

五篇经典好文,值得一看

Jenkins continuous integration operation
![[JS component] previous queue prompt](/img/79/9839f68b191b0db490e9bccbeaae1d.jpg)
[JS component] previous queue prompt

Minimum spanning tree problem
![[JS component] create a custom horizontal and vertical scroll bar following the steam style](/img/c0/9ad8c6abf3dbb210f3d8a46d55b110.jpg)
[JS component] create a custom horizontal and vertical scroll bar following the steam style
随机推荐
MySQL performance analysis - explain
How to handle different types of data
leetcode 206. Reverse linked list
Five classic articles worth reading (2)
Wal mechanism of MySQL
Matrix fast power
How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of vrsi, bbiboll, WR, bias and RSI indicators
Web Application & applet application deployment
Unity calls alertdialog
[Stanford Jiwang cs144 project] lab1: streamreassembler
Characteristics of transactions - persistence (implementation principle)
pycharm add configutions
Plusieurs catégories de tests logiciels sont claires à première vue
Leetcode-11- container with the most water (medium)
Self use notes for problem brushing learning
Introduction to convolutional neural network
Pipeline pipeline project construction
[latex] insérer une image
Unitywebrequest asynchronous Download
Common skills for quantitative investment - drawing 2: drawing the moving average