Tag: mysql

how to merge count values in sql

I am trying to update all city values of the table team as: “city” + “ #p” + “number of players” +” g” + “number of goals forward” (e.g. “Tokyo #p25 g74”). I tried to do this and have this two queries. One for get the number of players and one for get the number […]

SQL Aggregate in WHERE clause

What I have to do is: 2. Write a SELECT statement that answers this question: Which products have a list price that’s greater than the average list price for all products? Return the ProductName and ListPrice columns for each product. Sort the results by the ListPrice column in descending sequence. SQL code that I have […]

Automatically Loading the View

Can we create Materialized view in mysql or sql which will automatically reloaded with the data from the underlying bases table without hitting the base table. Elobration: I have created viewMasterTable view which is join of 3 tables, TableA,TableB,Table = viewMasterTable Now i want this view to be reloaded with the data if any changes […]

Error when building a MySQL table via Java

I keep getting an error that my MySQL CREATE TABLE statement is incorrect. The code that I have tried is as follows: String tablename = c + d; String ab = “”; for(int i=1 ; i <= k ; i++) { ab = “column” + k + ” VARCHAR(255),”; } String sql = “CREATE TABLE […]

SQL Many-To-Many relationships

Question Is there a way to have a many-to-many relationship among 3 tables without the use of automatic incrementers (usually ID), or are ID’s required for this? Why I ask I have 3 relative tables. Since one-to-one relationships seem to can’t happen directly, I made a 4th to do one-to-many relationships to the other 3 […]

MySql Connector/Net conflicting with application running SQL Server

I have an ASP.Net web application that runs on my local machine uses a datasource from a remote SQL Server 2012. I installed MySQL server on my machine for a completely different project and now when I do any process on my application that uses the remote database, I receive the following error: Configuration Error […]

To check if values are updated in MySQl after update trigger

I am converting a trigger from MSSQL to MySQL. There I came across a statement IF NOT UPDATE(UpdatedDateTime) How to check for the same condition in MySQL?

Solved : query exec fails when trying to write from qt to MS Sql database in windows using ODBC

I connect to my MSSQL database with odbc and writing data to it. I am not sure why I get the error: QODBCResult::exec: unable to bind variable: “[Microsoft][ODBC SQL Server Driver]Optional feature not implemented” bool DataManager::registerClient(Client&) “INSERT INTO ClientMaster (first_name, mid_name, last_name, phone_number, email_id, address_line1, address_line2, address_line3, dob) VALUES (xxx, xxx , xxx, +xxx-xxx, xx, […]

Database removal of old entries

My question is more of a high level question than technology specific. The problem I have is I am inserting into a database a list of users corresponding to a machine. When I do so I have no idea what users were previously but I want to remove users who are in the database that […]

How can I copy-and-paste Data into MySQL Workbench table?

I’ve used MySQL Workbench and MS SQL Server Management Studio off & on over the years. The one thing I enjoy with SSMS is the ability to copy information from an Excel document and paste it into the results pane of SSMS. Is there a similar means of importing information into tables for MySQL Workbench? […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.