Jump to content

Recommended Posts

Posted

para criar uma base de dados nova:  Usando o MySql

CREATE DATABASE `nome_da_base_de_dados` ;

agora para criar tabelas.... podes fazer...por exemplo...

tipo criar a tabela compras

CREATE TABLE compras (
                        id_compra    int(11)       NOT NULL UNIQUE,
  			datac       date          NOT NULL,
  			id_forn     int(11)       NOT NULL,
  			PRIMARY KEY  (n_compra),
	     );

e podes incluir :

check(total>=0,0)

tipo 1 tabela para fornecedores...

CREATE TABLE fornecedores (
  			    id_forn        int(11)    NOT NULL UNIQUE,
  			    nome_forn      char(30)   NOT NULL,
  			    descricao_forn  char(40)   default NULL,
  			    PRIMARY KEY  (id_forn)
		  );

mais alguma duvida especifica...pergunta...  😞

  • 2 weeks later...
Posted

Isso está bem explicadinho no manual oficial. Qdo tenho esse tipo de duvidas vou lá 😛 é bastante eficiente. experimenta tu mesma

http://dev.mysql.com/doc/refman/5.0/en/index.html

Faz uso das teclas ctrl+F para encontrar o tópico desejado 🙂

ja tinha colocado nos tutoriais a referencia pra sacarem esses manuais...estao tb em PT!! 🙂   🙂

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.