I want to create a table column that has a hh:mm format. How do I do that? I’ve tried it with time(0) but that also gives me the seconds. CREATE TABLE courseTimes ( startingTime time(0), …
Tag: database
Which one is the most optimal way to delete and update query in mysql?
Suppose, I need to delete or update some id informations from my database, which would be the best way to do it? Should I first find out that if that id exists or not? Or should I update the data then …
Another instance of Derby may have already booted the database
I’m connecting to a Derby DB through the command line. After connecting, by mistake got out from IJ in a unproper way. Now when I try to connect again this message is shown: I think this is happening …
How to bring columns to a table from another table by the Id?
I have this tables People, Ticket, and Report. I would like to replace the ForeingKey idPeople with columns Name and Age from People table. In the Report table replace the Foreing Key idTicket with ticketCol2, Name, Age from the previous table Ticket with replaced columns (idPeople by Name, Age). And I the result should be like this table and must
How do i group the time in and time out according to the employee number and date [closed]
attendence sql file[ ][2] I try to get attendance table data (which include the emp_no ,date ,time).i want insert the above table date as emp_no,date,time in and time out.time logic is show in below. …
How to access database on Android app without root
I’m developing a small app with a database of 100 elements. I import the database but only in one emulator (of 3 witch I have) runs correctly. I found that it runs without problems because the “Songs….
Get Data from a single table to an empty table
I am quite new to SQL. I couldn’t find solution and I want your expertise here. I have one table “boxes” and contains the color and type and condition. I want to get the number of types per color …
H2 org.h2.jdbc.JdbcSQLSyntaxErrorException occurs when executing a script file in a h2 database
I have used java -cp h2-1.4.199.jar org.h2.tools.RunScript -url jdbc:h2:mem:db1 -script infra_params.sql command to execute below sql script in a H2 database. infra_params.sql file:- DROP TABLE IF …
How to display the name of a supervisor for a certain worker MYSQL
Display the name of McLester’s supervisor. Using standard syntax select sup.lastname “Supervisor’s Name” from staff e, staff sup where e.supervisorno = sup.staffno and lastname = ‘McLester’; Here is …
Using select distinct with sum
I am not sure if what I want can be done but basically, I have a homework where I am supposed to come up with sql statements to filter through a database of a made up TCM company in any way. I wanted …