Question about Sun MySQL

1 Answer

MySQL data types

When i create a table, and run SHOW CREATE TABLE on it, sometimes the results are different than what i typed.

What is the reason for the change in the data?

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    MVP:

    An expert that gotĀ 5 achievements.

    Governor:

    An expert whose answer gotĀ voted for 20 times.

    Hot-Shot:

    An expert who has answered 20 questions.

  • Contributor
  • 30 Answers

These are the types i know

1.VARCHARs with length less than 4 become CHARs
2.CHARs with length more than 3 become VARCHARs.
3.NOT NULL gets added to the columns declared as PRIMARY KEYs
4.Default values such as NULL are specified for each column

If there are more i'm sure folks around here will post them.

Posted on Aug 11, 2008

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

2 Answers

How to restore MySQL database Windows tool?


You can restore corrupt and delete SQL database file in few steps for MySQL Restore Toolbox. With this software you can also recover triggers, keys, indexes and table. Software support multiple MDF file recovery option. Software is supported by all Windows operating system. Get more ideas and download free trial version from -http://www.filerepairforum.com/forum/databases/databases-aa/mysql/1162-dump-mysql-database-file-is-error

May 29, 2015 | Sun MySQL

2 Answers

How to fix mysql error 1046?


For the database import, before you attempt to import the "flat" file data in, you need go to your local DB (MySQL) and create new database
After that you can import!
Also check this links:
http://www.repairtoolforsql.fixtoolbox.com/ Fix Toolbox for MySQL
http://www.sqlservercentral.com/Forums/Topic1618894-2893-1.aspx

Apr 09, 2015 | Quest Software Toad for MySQL

1 Answer

Need to make my table display in rows instead of column.


David, what you're looking for is pivot table functionality. Unfortunately, that is not a built-in feature for MySQL (it is for SQL Server 2005/2008).
Not knowing your table structure, or the size/number of rows/columns, I found the following link to be most helpful example: MySQL Pivot Table Example

Sep 04, 2013 | Sun MySQL

1 Answer

Lucky draw coding


You need two things:
1. JSP/Servlet knowledge.
2. SQL Programming basics

1. Create your PR jsp page which contain a form with method post and action to a servlet that will handle the insertion of the data to a database table i would add winners table containing ID, Frkey, thenumber

2. A servlet that will generate the number and cross check with those who guessed right and update the winners table with that data.

3. A servlet that will do an inner join with the pr and winners tables to display the results.

Good luck

Apr 05, 2010 | Sun Java Programming Language (cdj-275)

2 Answers

Php counter


You might want to note that this is not the most effective manner of creating a counter in PHP. On a few of my websites, I find it is much more effective to simply create a text file, eg. counter.txt and have PHP read that every time the page is loaded, instead of running a MySQL query. Then, have PHP also update the counter.txt file by adding 1 to the number already listed in the file and read to the user.

Mar 19, 2009 | The PHP Group PHP

3 Answers

Payroll system in DBMS. I don't know what data is to be taken.


Firstly you need to determine/state whether you are using a database application, such as Access, MtSQL or MS SQL and programming them to do create this application, or are you using a programming development tool such as Visual Studio, ASP.NET, PHP or the like, as the solution and guidance will be different for each.
In terms of the data design, you should store the data necessary to identify each employee uniquely and each data point per employee needed to calculate their payroll. You should then store the generic (applys to all employees) such as tax rates, in separate tables and call on it to calculate wages and other paystub data.
For instance, the employee first and last names and tax ID should be a sufficient unique identifier. Create a table for just employees, their names, tax ID, start date, schedule, pay rate, number of deductions, direct bank payment data, etc., and whatever else you decide you need for each employee. You can calculate their wages by multiplying their rate by their schedule and applying the appropriate tax rate and medical/witholding deductions as you go, so calculated data does not need to be stored and consume database space. 
You'll likely need a separate table for common data such as tax rates, one for deductions/witholdings, one for holidays, one for vacation accrual rates, one for medical rates, etc. This data if common to employees does not need to be stored per individual, as that would cause redundant replication of data. If the employees are on an hourly rate, rather than a set salary/wage, then you'll need a table of worked hours per employee, akin to their timesheet data. If you use a timesheet/timecard, the entering and storing only the totals and keeping the physical timesheet for backup records should suffice.
Once you design and populate your database as suggested above, then it's a relatively-simple task of calculating the computed paystub data and storing the salient resulting datapoints for the record.
Consider a reporting application, such as Crystal Reports, for your printing needs, as its far easier to configure Crystal or similar product to format reports, paystubs, checks, etc., than coding these from scratch.
Hope this helps.

Dec 25, 2008 | Compilers & Programming Tools

4 Answers

Table Repair MySQL


MySQL offers Check Table syntax that checks a table or tables for errors. It works for several storage engines like MyISAM, InnoDB, & Archive. If you run this syntax then you can the cause of problem & reported tables.

If Check Table finds errors then you can repair reported tables by Repair MySQL Table syntax.

Aug 06, 2008 | Sun MySQL

1 Answer

MySQL Auto Increase


Try this -


CREATE TABLE users (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
login TEXT NOT NULL,
password TEXT NOT NULL,
PRIMARY KEY( id )
);

INSERT INTO users VALUES ( null, 'bob', 'mypassword' );
INSERT INTO users VALUES ( null, 'bill', 'pass' );
INSERT INTO users VALUES ( null, 'sean', '1234' );

Aug 04, 2008 | Sun MySQL

2 Answers

MySQL Crashes


could you give me more info plz

Jul 28, 2008 | Sun MySQL

1 Answer

SQL Server Data Export


The best way to handle this situation is to generate a script of the database objects and then run it on the remote server before exporting the data.

Jan 23, 2008 | Compilers & Programming Tools

Not finding what you are looking for?
Sun MySQL Logo

Related Topics:

75 people viewed this question

Ask a Question

Usually answered in minutes!

Top Sun Compilers & Programming Tools Experts

Robin Hill
Robin Hill

Level 3 Expert

1251 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18298 Answers

Justin
Justin

Level 3 Expert

2072 Answers

Are you a Sun Compiler and Programming Tool Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...