Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Oracle Database wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Concurrency control wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Functional Database Model wikipedia , lookup
Clusterpoint wikipedia , lookup
Using XAMPP and SQL from Command Prompt - Click Windows Start Button > enter cmd in search box C:\Users\winterf>cd\xampp\mysql\bin NOTE1: When using cmd - to copy: Right-click > choose Mark, highlight and tap [Enter] NOTE2: It is easier to create in Notepad and copy into the command line, using right-click to Paste C:\xampp\mysql\bin>mysql -u root -p (-p is optional - for a password) Enter password: Welcome to the MySQL monitor. Commands end with ; Type 'help;' or '\h' for help. mysql> create database payroll; Query OK, 1 row affected (0.03 sec) (if you leave out semicolon, type ; in next line and tap [Enter] mysql> use payroll; Database changed mysql> describe payroll; mysql> show databases; (display a list of existing databases) mysql> select database(); (payroll is in a folder under mysql/data) +------------+ | database() | +------------+ | NULL | +------------+ 1 row in set (0.00 sec) mysql> create table employees (EmpID INTEGER PRIMARY KEY, Name VARCHAR(20), Hours INTEGER, Rate FLOAT); mysql> show tables; +-------------------+ | Tables_in_payroll | +-------------------+ | employees | +-------------------+ 1 row in set (0.00 sec) mysql> describe employees; +-------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+-------+ | EmpID | int(11) | NO | PRI | NULL | | | Name | varchar(20) | YES | | NULL | | | Hours | int(11) | YES | | NULL | | | Rate | float | YES | | NULL | | +-------+-------------+------+-----+---------+-------+ 4 rows in set (0.01 sec) mysql> INSERT INTO employees (EmpID, Name, Hours, Rate) VALUES (101, "Allen", 40, 10); Query OK, 1 row affected (0.04 sec) mysql> select * from employees; +-------+-------+-------+------+ | EmpID | Name | Hours | Rate | +-------+-------+-------+------+ | 101 | Allen | 40 | 10 | +-------+-------+-------+------+ 1 row in set (0.00 sec)