Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

ERROR 1046 (3D000): No database selected

# At first you have to create Database 
CREATE DATABASE student_sql;

# Next, specify the database to use
USE student_sql;

# Demo: create a table 
CREATE TABLE student_table(
    student_id INT PRIMARY KEY,
    name VARCHAR(20),
    major VARCHAR(20)
);

# Describe the table 
describe student_table;
 
PREVIOUS NEXT
Tagged: #ERROR #No #database #selected
ADD COMMENT
Topic
Name
5+3 =