Create a database in MySql:
using MySql phpMyAdmin
SQL command to create a database in MySql.
create DATABASE BOOKDB;
use database to create a table into that database using the sql command. or select from the database which is display in the left menu list.
1. Now create a table using the sql command:
CREATE TABLE IF NOT EXISTS Book (
ID INT NOT NULL PRIMARY KEY,
Title VARCHAR(50),
Author VARCHAR(50),
Year INT(10),
Price INT(10)
);
2. Insert the data into database:
INSERT INTO Book VALUES(1, 'C','Riche',1955,10);
INSERT INTO Book VALUES(2, 'JAVA Script','Karen',1958,20);
INSERT INTO Book VALUES(4, 'Java','Schwartz',1959,10);
INSERT INTO Book VALUES(5, 'C++','Ross',1959,20);
INSERT INTO Book VALUES(6, 'Prolog','Maria',1972,10);
INSERT INTO Book VALUES(7, 'Perl','Wall',1987,20);
3. List the books title and years only.
SELECT Title, Year from Book;
Database Management Gmail Maps © Hanson College BC... Dashboard Go to Help Search ID Year Price...
create table please for my SQL
data.txt
1,C,Richie,1955
2,JAVA Script,Karen,1958
4,Java,Schwartz,1959
5,C++,Ross,1959
6,prolog,Maria,1972
7,Perl,Wall,1987
ID Title Author Price 1 Richie Karen Year 1955 1958 1959 C JAVA Script Java C++ prolog 2 4 10 20 10 5 Schwartz Ross Maria 1959 1972 20 10 6 7 Perl Wall 1987 20 The above relation has information about different books. The table information is already saved as txt format in Moodle under the name Quiz2Data.txt. Using MySql on your computer do: Create...
help create a table
data.txt
1,C,Richie,1955
2,JAVA Script,Karen,1958
4,Java,Schwartz,1959
5,C++,Ross,1959
6,prolog,Maria,1972
7,Perl,Wall,1987
ID Title Year Price 1 Author Richie Karen 1955 1958 10 20 2 4 C JAVA Script Java C++ prolog 1959 10 5 Schwartz Ross Maria 1959 1972 20 10 6 7 Perl Wall 1987 20 The above relation has information about different books. The table information is already saved as txt format in Moodle under the name Quiz2Data.txt. Using MySql on your computer do: Create a database...
Database Management
ID Price 1 Author Richie Karen 10 2 4 Year 1955 1958 1959 Title с JAVA Script Java C++ prolog Perl 20 10 5 6 Schwartz Ross Maria 1959 1972 20 10 7 Wall 1987 20 The above relation has information about different books. The table information is already saved as txt format in Moodle under the name Quiz2Data.txt. Using MySql on your computer do: Create a database Create a table with name book, then load Quiz2Data.txt (check...
Database Management
ID Title 1 Author Richie Karen с JAVA Script Java Year 1955 1958 1959 Price 10 20 10 2 4 5 6 C++ prolog Peri Schwartz Ross Maria 1959 1972 20 10 7 Wall 1987 20 The above relation has formation about different books. The table information is already saved as txt format in Moodle under the name Quiz2Data.txt. Using MySql on your computer do: Create a database • Create a table with name book, then load Quiz2Data.txt...