Sql Query Assignment

Sql Query Assignment-80
To demonstrate how this is possible, I will use a Sports example.

Tags: Narrative Paper Thesis StatementResearch Paper On Life Of PiManipulation Media EssaysOutline Page For Research PaperBiography Term PaperSchool Lunch EssayCritical Essay On TwilightThesis About Motivation In Learning EnglishResearch Proposal Budget ExampleGrizzly Bear Essays

To illustrate, we will use the SQL statement CREATE TABLE EMPLOYEES to create the employees table with 16 attributes or fields.

USE SW CREATE TABLE EMPLOYEES ( Employee No CHAR(10) NOT NULL UNIQUE, Department Name CHAR(30) NOT NULL DEFAULT “Human Resources”, First Name CHAR(25) NOT NULL, Last Name CHAR(25) NOT NULL, Category CHAR(20) NOT NULL, Hourly Rate CURRENCY NOT NULL, Time Card LOGICAL NOT NULL, Hourly Salaried CHAR(1) NOT NULL, Emp Type CHAR(1) NOT NULL, Terminated LOGICAL NOT NULL, Exempt Code CHAR(2) NOT NULL, Supervisor LOGICAL NOT NULL, Supervisor Name CHAR(50) NOT NULL, Birth Date DATE NOT NULL, College Degree CHAR(5) NOT NULL, CONSTRAINT Employee_PK PRIMARY KEY(Employee No ); The first field is Employee No with a field type of CHAR.

Then in the late 1970s, Relational Software Inc., which is now Oracle Corporation, introduced the first commercially available implementation of SQL, Oracle V2 for VAX computers.

Many of the currently available relational DBMSs, such as Oracle Database, Microsoft SQL Server (shown in Figure 15.1), My SQL, IBM DB2, IBM Informix and Microsoft Access, use SQL.

Once the database is created, the next step is to create the database tables.

The general format for the CREATE TABLE command is: The Column Name must be unique within the table.

Many of the data types have a size such as CHAR(35) or Numeric(8,2).

Bit –Integer data with either a 1 or 0 value Int –Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 – 1 (2,147,483,647) Smallint –Integer data from 2^15 (-32,768) through 2^15 – 1 (32,767) Tinyint –Integer data from 0 through 255 Decimal –Fixed precision and scale numeric data from -10^38 -1 through 10^38 Numeric –A synonym for decimal Timestamp –A database-wide unique number Uniqueidentifier –A globally unique identifier (GUID) Money – Monetary data values from -2^63 (-922,337,203,685,477.5808) through 2^63 – 1 ( 922,337,203,685,477.5807), with accuracy to one-ten-thousandth of a monetary unit Smallmoney –Monetary data values from -214,748.3648 through 214,748.3647, with accuracy to one-ten-thousandth of a monetary unit Float –Floating precision number data from -1.79E 308 through 1.79E 308 Real –Floating precision number data from -3.40E 38 through 3.40E 38 Datetime –Date and time data from January 1, 1753, to December 31, 9999, with an accuracy of one-three-hundredths of a second, or 3.33 milliseconds Smalldatetime –Date and time data from January 1, 1900, through June 6, 2079, with an accuracy of one minute Char –Fixed-length non-Unicode character data with a maximum length of 8,000 characters Varchar –Variable-length non-Unicode data with a maximum of 8,000 characters Text –Variable-length non-Unicode data with a maximum length of 2^31 – 1 (2,147,483,647) characters Binary –Fixed-length binary data with a maximum length of 8,000 bytes Varbinary –Variable-length binary data with a maximum length of 8,000 bytes Image – Variable-length binary data with a maximum length of 2^31 – 1 (2,147,483,647) bytes The Optional Column Constraints are NULL, NOT NULL, UNIQUE, PRIMARY KEY and DEFAULT, used to initialize a value for a new record.

provide best and exclusive assistance to learners who always look for help in their assignments and projects and hired professionals are doing remarkable work in the concern field by delivering all the work on time without any error and plagiarism.

It may be useful sometimes to convert an Excel sheet into a My SQL database.


Comments Sql Query Assignment

The Latest from zaveta.ru ©