Question

SQL commans For this assignment, submit a text file with the commands that you entered into your MySQL database on burrow to

please write a file with the commands attached
0 0
Add a comment Improve this question Transcribed image text
Answer #1

//first question


CREATE TABLE IF NOT EXISTS `singer` (
`Singer ID` int(11) DEFAULT NULL,
`FirstName` varchar(30) DEFAULT NULL,
`LastName` varchar(30) DEFAULT NULL,
`Label` varchar(30) DEFAULT NULL,
`Salary` int(11) DEFAULT NULL,
`Style` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

//second question
CREATE TABLE IF NOT EXISTS `tour` (
`TourID` int(11) DEFAULT NULL,
`TourName` varchar(30) DEFAULT NULL,
`Begin` date DEFAULT NULL,
`End` date DEFAULT NULL,
`Headliner` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

//third question
insert into singer (SingerID,FirstName,LastName,Label,Salary,Style)values(1,'Srinu','Kanchi','Sony',25000,'style');

//fourth question
SELECT * FROM `singer` WHERE Salary>250000 and Label='Sony';

Add a comment
Know the answer?
Add Answer to:
please write a file with the commands attached SQL commans For this assignment, submit a text...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • create a view vHW1_Q3 with columns (state, population, NumofZipcode) showing the total population and the number...

    create a view vHW1_Q3 with columns (state, population, NumofZipcode) showing the total population and the number of zip code (NumofZipcode) of each state and DC. The result should be sorted by the population size from high to low. The output should have 51 rows. using mysql Questions based on table Zipcode_info in datamining database. 50 US states and one DC means capital washington. these are fields in db +---------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default |...

  • Using SQL and the following info Question 3: Find the people who do not have Viper...

    Using SQL and the following info Question 3: Find the people who do not have Viper Certification but are still assigned to Viper class ship Find the fname, lname, and ship_instance_id for all people who do not have Viper certification but are assigned to at least one instance of a Viper class ship (this includes all variants of Viper class ships). Return a row for every ship/person combination. Order your results by fname in ascending order. Use the BSG database...

  • Using SQL and the following info Question 3: Find the people who do not have Viper...

    Using SQL and the following info Question 3: Find the people who do not have Viper Certification but are still assigned to Viper class ship Find the fname, lname, and ship_instance_id for all people who do not have Viper certification but are assigned to at least one instance of a Viper class ship (this includes all variants of Viper class ships). Return a row for every ship/person combination. Order your results by fname in ascending order. Use the BSG database...

  • stuck on creating view Use a SQL statement to create a view vIBM_MMM (year, month, IBM_price,...

    stuck on creating view Use a SQL statement to create a view vIBM_MMM (year, month, IBM_price, MMM_price) that contains the year and month, average close prices of IBM and MMM for the year/month. Your view should directly access the Historial_price table to have the latest data. mysql> desc Historical_prices; +-----------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+-------------+------+-----+---------+----------------+ | id | bigint(20) | NO | PRI | NULL | auto_increment | | symbol |...

  • 11. Consider the following simple database with one table with the following schema: Field | Type...

    11. Consider the following simple database with one table with the following schema: Field | Type Null key | Default | Extra auto_increment ! - I tid | int(4) NO | name varchar(30) | YES | | subji | int(2) | YES | subj2 | int(2) | YES I 1 subj3 | int(2) | YES | total | int(3) | YES PRI NULL | NULL NULL NULL NULL NULL - Transactions INSERT a tuple for a new student with the...

  • how does it differ from the white kkdata schema compare to the kkdata6. This is database;...

    how does it differ from the white kkdata schema compare to the kkdata6. This is database; mysgl> describe kkdata6 Field. Nu11 Type work no int (11) YES art first varchar (34) YES art last varchar (34) YES gertitle varchar (79) YES engtitle varchar (79) YES datemonth varchar (9) YES date year varchar (5) YES datetext varchar (60) YES varchar (200) l YES medium dimh varchar (6) YES dimw varchar (6) YES credit varchar (200) YES varchar (77) YES Own name...

  • SQL problem solving help; First 3 tables are finnished; Need help understanding on how to do...

    SQL problem solving help; First 3 tables are finnished; Need help understanding on how to do steps after. First 3 tables are after the first 2 images for reference if needed. //1// CREATE TABLE kr_customer ( Name VARCHAR(40) NOT NULL PRIMARY KEY, City VARCHAR(20), Status CHAR(1) ); //2// CREATE TABLE kr_salesperson ( Name VARCHAR(40) NOT NULL PRIMARY KEY, Age INT, Salary DECIMAL(8, 2) ); //3// CREATE TABLE kr_order ( Order_Number number(3) NOT NULL PRIMARY KEY, Customer_Name VARCHAR(40), Salesperson_Name VARCHAR(40), Amount...

  • These question is for mysql, so I want know what is answer that is information for...

    These question is for mysql, so I want know what is answer that is information for source: DROP DATABASE IF EXISTS travel; CREATE DATABASE travel; USE travel; -- -- Table structure for table `equipment` -- DROP TABLE IF EXISTS `equipment`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `equipment` ( `EquipID` int(11) NOT NULL DEFAULT '0', `EquipmentName` varchar(50) NOT NULL DEFAULT '', `EquipmentDescription` varchar(100) NOT NULL DEFAULT '', `EquipmentCapacity` int(11) NOT NULL DEFAULT '0',...

  • I keep getting this error "You have an error in your SQL syntax; check the manual...

    I keep getting this error "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4" line 4 is the "Genre char(20) not null," any help or guidance would be lovely create table Games      (gameid int not null auto_increment primary key,       title varchar(100) not null,       Genre char(20) not null,       year_released int not null);      insert into Games(title, Genre,...

  • Connect to mySQL DBMS, open a SQL script file, navigate to CityJail.sql file and execute it...

    Connect to mySQL DBMS, open a SQL script file, navigate to CityJail.sql file and execute it to create tables and populate with the supplied data. If there are any errors in the script fix them. It is your job to find the errors and correct them. This is important. You will need correct data for future exercises in this module. Then answer all questions. Write the answer below each question then take screen shot of the result. This script builds...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT