Git Product home page Git Product logo

intern-study's Introduction

intern-study

mysql study

mysql> create table demo01 ( name varchar(100) not null, age int not null default 10   );
Query OK, 0 rows affected (0.02 sec)

mysql> desc demo01;
+-------+--------------+------+-----+---------+-------+
| Field | Type         | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| name  | varchar(100) | NO   |     | NULL    |       |
| age   | int(11)      | NO   |     | 10      |       |
+-------+--------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

mysql> desc demo01;
+-------+--------------+------+-----+---------+-------+
| Field | Type         | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| name  | varchar(100) | NO   |     | NULL    |       |
| age   | int(11)      | NO   |     | 10      |       |
+-------+--------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

mysql>
mysql>
mysql> insert into demo01  values ('mulder', 1), ('scully', 2);
Query OK, 2 rows affected (0.00 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> insert into demo01 (name, age) values ('moon', 100);
Query OK, 1 row affected (0.01 sec)

mysql> insert into demo01 (age, name) values (20, 'park');
Query OK, 1 row affected (0.01 sec)

mysql> select * from demo01;
+--------+-----+
| name   | age |
+--------+-----+
| mulder |   1 |
| scully |   2 |
| moon   | 100 |
| park   |  20 |
+--------+-----+
4 rows in set (0.00 sec)

mysql>


mysql> grant all privileges on mysql.* to 'mulder'@'127.0.0.1' identified by '1111' with grant option;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql>
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)


mysql>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.