- #1
CREATE TABLE animals (
id INT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
);
mysql -u'user' -p'password' < myfile.sql
I need a program where I can organize my data similar to excel, would MySQLWorkbench be able to do this? Can excel create sql files?newjerseyrunner said:That's phpmyadmin, not SQL. I would ignore it, and learn how to interact with SQL directly.
Sql is like a programming language, and included in that is building commands. You can store all of this in a file and simply tell mysql to run the file.
myfile.sql
Code:CREATE TABLE animals ( id INT NOT NULL AUTO_INCREMENT, name CHAR(30) NOT NULL, PRIMARY KEY (id) );
You can also use a tool called MySQLWorkbench, which can do everything phpmyadmin can do, and a whole lot more.Code:mysql -u'user' -p'password' < myfile.sql
kolleamm said:I created a database on my website, and now I'm guessing I have to add tables for the information. I have no idea what I'm looking at when I'm asked to create a table.
kolleamm said:I need a program where I can organize my data similar to excel, would MySQLWorkbench be able to do this? Can excel create sql files?
A database may be overkill depending on why you are looking to move away from Excel. I suggest starting with MS Access as a gateway tool between Excel and a full-blown RDBMS.kolleamm said:I need a program where I can organize my data similar to excel
There are import/export capabilities/wizards between Excel and SQL. Look up the import/export wizard in SQL Server and similar in Excel. If you want to export from Excel to SQL , you may have to do a bit of scripting if the receiving database schema is too different from the file, but you can also rewrite your database.kolleamm said:I need a program where I can organize my data similar to excel, would MySQLWorkbench be able to do this? Can excel create sql files?
Thanks in advance
SQL stands for Structured Query Language, and it is a programming language used for managing and manipulating data in relational databases. It allows users to create, insert, update, and retrieve data from databases.
SQL tables are created using the CREATE TABLE command, which specifies the table name and the columns and their data types. Optional parameters such as constraints and default values can also be specified.
The most commonly used data types in SQL tables are VARCHAR (variable-length character strings), INT (integer), FLOAT (floating-point number), and DATE (date and time values). There are also other data types available for specific purposes, such as BOOLEAN, TEXT, and BLOB.
Relationships between tables are established using foreign keys, which are columns that reference the primary key of another table. This allows for data to be connected and retrieved from multiple tables.
The data in SQL tables can be modified or updated using the INSERT, UPDATE, and DELETE commands. These commands allow for the addition of new data, the modification of existing data, and the removal of unwanted data, respectively.