Answers for "w3schools sql create database"

SQL
4

create database mysql utf8

CREATE DATABASE mydatabase CHARACTER SET utf8 COLLATE utf8_general_ci;
Posted by: Guest on March-26-2020
13

create database mysql

CREATE DATABASE `mydb`;

CREATE TABLE `my_table`
(
	my_table_id INT AUTO_INCREMENT,
    my_table_name VARCHAR(30) NOT NULL,
    my_foreign_key INT NOT NULL,
    my_tb_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  	my_tb_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ,
    # Any other properties here
    PRIMARY KEY(my_table_id),
    CONSTRAINT fk_name_of_parent_table
    FOREIGN KEY(my_foreign_key) REFERENCES parent_table(parent_table_column)
);

SHOW DATABASES;
Posted by: Guest on February-08-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language