Skip to content

Instantly share code, notes, and snippets.

View AlexaderLex's full-sized avatar

Alexander AlexaderLex

View GitHub Profile
We couldn’t find that file to show.
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Jun 07, 2019 at 07:58 AM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SELECT p.productName, pl.productLine, c.customerName
FROM productlines AS pl INNER JOIN products AS p
ON pl.productLine = p.productLine
INNER JOIN orderdetails AS od
USING (productCode)
INNER JOIN orders AS o
USING (orderNumber)
INNER JOIN customers AS c
USING (customerNumber)
CREATE FUNCTION full_name(first_nm CHAR(20), last_nm CHAR(30) )
RETURNS CHAR(60) DETERMINISTIC
RETURN CONCAT(first_nm, ' ', last_nm);
-- '2019-05-25 13:00:10.123456' -- DATETIME
-- '2018-05-26 11:00:10.133333'
-- '2019-04-01' -- DATE
-- '2019-02-03'
-- '09:20:00.123456' -- TIME
-- '15:20:00.123456'
-- 1559335502 -- TIMESTAMP
SELECT UNIX_TIMESTAMP('2019-05-25 13:00:10.123456'), UNIX_TIMESTAMP(), NOW(), SYSDATE(6);
/*
*********************************************************************
http://www.mysqltutorial.org
*********************************************************************
Name: MySQL Sample Database classicmodels
Link: http://www.mysqltutorial.org/mysql-sample-database.aspx
Version 3.2
+ changed the order of the CREATE TABLE and ALTER TABLE commands to work with MySQL 5.7
and issues with FOREIGN KEY CONSTRAINTS
Version 3.1
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: May 26, 2019 at 07:52 PM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: May 20, 2019 at 06:28 PM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: May 20, 2019 at 04:58 PM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: May 19, 2019 at 07:01 PM
-- Server version: 5.7.25
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";