Ir para conteúdo
  • ×   Você colou conteúdo com formatação.   Remover formatação

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

  • Conteúdo Similar

    • Por cesarhtc
      Boa noite, estou precisando copiar tabelas oracle, como são muitas tabelas só quero copiar somente aquelas que foram alteradas em seus registros ou estrutura no dia (diariamente).
       
      desde já agradeço.
    • Por Kefatif
      Prezados, boa tarde.
       
      Gostaria de ajuda para caso o valor no banco mysql, campo "fase" seja igual a "2" retorne uma mensagem, caso contrário siga o código
       
      Fico agradecido desde já.
       
      Abs.
    • Por Quencyjones79
      Olá a todos, sou novo na área de multimídia. Estou a seguir a um momento um ebook sobre a criação de uma base de dados e também a criação de tabelas. Mas quando vinculei as tabelas do banco de dados, no phpmyadmin me deu alguns erros. Fiz a correspondência da chave primária (artist_id da tabela Artist) com a artist_id da tabela Prints (chave estrangeira) e assim por diante. O problema é que ele não mostra minhas relações das tabelas e me dá uma mensagem de erro. Então, alguns de vocês poderiam me ajudar, por favor, a consertar esta situação. Eu serei grato. Cumprimentos.
       
      Ps .: Abaixo envio o arquivo Sql.
       
      Atentamente,

      José Moreira
      -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 07, 2021 at 08:49 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `ecommerce` -- -- -------------------------------------------------------- -- -- Table structure for table `artists` -- CREATE TABLE `artists` ( `artist_id` int(10) UNSIGNED NOT NULL, `first_name` varchar(20) DEFAULT NULL, `middle_name` varchar(20) DEFAULT NULL, `last_name` varchar(40) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `customers` -- CREATE TABLE `customers` ( `customer_id` int(10) UNSIGNED NOT NULL, `email` varchar(60) NOT NULL, `pass` char(40) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `orders` -- CREATE TABLE `orders` ( `order_id` int(10) UNSIGNED NOT NULL, `customer_id` int(10) UNSIGNED NOT NULL, `total` decimal(10,2) UNSIGNED NOT NULL, `order_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `order_contents` -- CREATE TABLE `order_contents` ( `oc_id` int(10) UNSIGNED NOT NULL, `order_id` int(10) UNSIGNED NOT NULL, `print_id` int(10) UNSIGNED NOT NULL, `quantity` tinyint(3) UNSIGNED NOT NULL DEFAULT 1, `price` decimal(6,2) UNSIGNED NOT NULL, `ship_date` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `prints` -- CREATE TABLE `prints` ( `print_id` int(10) UNSIGNED NOT NULL, `artist_id` int(10) UNSIGNED NOT NULL, `print_name` varchar(60) NOT NULL, `price` decimal(6,2) UNSIGNED NOT NULL, `size` varchar(60) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `image_name` varchar(60) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; -- -- Indexes for dumped tables -- -- -- Indexes for table `artists` -- ALTER TABLE `artists` ADD PRIMARY KEY (`artist_id`), ADD UNIQUE KEY `full_name` (`last_name`,`first_name`,`middle_name`); -- -- Indexes for table `customers` -- ALTER TABLE `customers` ADD PRIMARY KEY (`customer_id`), ADD UNIQUE KEY `email` (`email`), ADD KEY `login` (`email`,`pass`); -- -- Indexes for table `orders` -- ALTER TABLE `orders` ADD PRIMARY KEY (`order_id`), ADD KEY `customer_id` (`customer_id`), ADD KEY `order_date` (`order_date`); -- -- Indexes for table `order_contents` -- ALTER TABLE `order_contents` ADD PRIMARY KEY (`oc_id`), ADD KEY `order_id` (`order_id`), ADD KEY `print_id` (`print_id`), ADD KEY `ship_date` (`ship_date`); -- -- Indexes for table `prints` -- ALTER TABLE `prints` ADD PRIMARY KEY (`print_id`), ADD KEY `artist_id` (`artist_id`), ADD KEY `print_name` (`print_name`), ADD KEY `price` (`price`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `artists` -- ALTER TABLE `artists` MODIFY `artist_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `customers` -- ALTER TABLE `customers` MODIFY `customer_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `orders` -- ALTER TABLE `orders` MODIFY `order_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `order_contents` -- ALTER TABLE `order_contents` MODIFY `oc_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `prints` -- ALTER TABLE `prints` MODIFY `print_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
       

    • Por OSVALDO ARANTES JÚNIOR
      Boa tarde,  estou desenvolvendo uma consulta no php/mysql em diversas colunas. E gostaria de saber
      se existe um caracter especial para listar todos os dados, minha quere esta organizada da seguinte forma
       
      $query = sprintf("SELECT * FROM operacao  WHERE data_operacao BETWEEN '$data_inicial_rel' AND '$data_final_rel' AND estado_operacao = ' ' ORDER BY id_operacao ASC ;");
       
      quando declaro o valor do estado_operacao ele lista perfeitamente o valor, agora minha dúvida é se existe um 
      carater para listar todos os valores... para que eu use como value no opition do select, passar o valor TODOS pra a query
       
      desde já agradeço a atenção.
    • Por Rogério Orlando
      Na SQL abaixo, quando consulto as tabelas, os registros se repetem, apresentando mais do que realmente existem.
      Alguém pode auxiliar no que está errado ou o que falta para que a select retorne apenas um registro para cada documento?
      Esclareço que todas as tabelas tem um campo "documento", porém ele não é chave e no retorno trouxe todos os campos de todas as tabelas e não apenas as dá SQL:
       
       
      select so01.documento,so01.digito,so01.nome,so01.regional,so01.situacao,so01.observacao,so01.n_spprev,so01.averbacao, so02.endereco, so02.numero, so02.bairro,so02.cidade,so02.cep,so02.estado,so02.aniversario, so03.rg, so03.cpf, so03.email, so04.estado_civil, so04.agencia,so04.dg_agencia,so04.conta,so04.dg_conta,so04.banco,so04.ddd,so04.telefone,so04.nascimento, so04.admissao,so04.demissao_seg,so04.admor,so04.ddd_cel,so04.celular from so03 inner join so01 ON so01.documento= so03.documento inner join so02 ON so02.documento= so03.documento inner join so04 ON so04.documento=so03.documento where so01.documento="68" and so01.digito="0"  
       
×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.