create new database in sql code example
Example 1: sql crate database
CREATE DATABASE databasename;
Example 2: create database sql
CREATE TABLE example (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
Example 3: sql create database
Creates a new database.
Example: Creates a new database named ‘websitesetup’.
CREATE DATABASE websitesetup;