1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
MakcuM [25]
4 years ago
14

What is DATE data type and its syntax and what is TIMESTAMP data type and its syntax in SQL language.Explain the difference betw

een both of them .
Computers and Technology
1 answer:
qaws [65]4 years ago
5 0

Answer: The DATE datatype give us the particular date whereas TIMESTAMP gives us the date as well as the time as the particular moment.

Explanation:

DATE datatype gives us the date in the format yyyy-mm-dd. The timestamp format is yyyy-mm-dd hh:mm:ss. time stamp are of two types :

timestamp with time zone and timestamp without time zone.

Date is the date on that particular day whereas the timestamp is the date along with the specific time when the query is executed.

You might be interested in
Which statement best describes antivirus software?
valentina_108 [34]
It identifies and removes viruses in computers
7 0
4 years ago
Why should the government create money it doesn’t have?
murzikaleks [220]

Answer:

to increase economy of the country

Explanation:

if the government does so the people will be able to access the money this increasing government revenue. This increasing the economy

8 0
3 years ago
Read 2 more answers
Please use thread to complete the following program: one process opens a file data.txt, then creates a thread my_thread. The job
Firlakuza [10]

Answer:

Here is the code:-

//include the required header files

#include<stdio.h>

#include<pthread.h>

// method protocol definition

void *count_lines(void *arg);

int main()

{

    // Create a thread handler

    pthread_t my_thread;

    // Create a file handler

    FILE *fh;

    // declare the variable

    int *linecnt;

    // open the data file

    fh=fopen("data.txt","r");

// Create a thread using pthread_create; pass fh to my_thread;

    pthread_create(&my_thread, NULL, count_lines, (void*)fh);

    //Use pthread_join to terminate the thread my_thread

    pthread_join( my_thread, (void**)&linecnt );

    // print the number of lines

printf("\nNumber of lines in the given file: %d \n\n", linecnt);

    return (0);

}

// Method to count the number of lines

void *count_lines(void *arg)

{

    // variable declaration and initialization

    int linecnt=-1;

    char TTline[1600];

    //code to count the number of lines

    while(!feof(arg))

    {

         fgets(TTline,1600,arg);

         linecnt++;

    }

    pthread_exit((void *)linecnt);

    // close the file handler

    fclose(arg);

}

Explanation:

Program:-

8 0
3 years ago
Write a program for a grocery store to calculate the total charge for customers. In the main: Your program should ask customer t
gavmur [86]

Answer:

Hello Joelwestwood! This is a good question to check your knowledge of subrountines and Arrays. Please find the implementation with the explanation below.

Explanation:

The solution can be implemented in a number of languages including C++, Java and Python to name a few. Though the implementation language is not specified in the question, i'll provide you the implementation code in Python and also in Java. Java implementation is a little complex because we need to define an array size to be able to add items to it, whereas Python allows us more flexibility by allowing dynamic size of Array.

JAVA IMPLEMENTATION

import java.util.Scanner;

import java.util.Arrays;

class TotalCharge {

 private static int[] price_array = new int[1];

 public void FillPriceArray(int price) {

   if (price_array.length == 1) {

     price_array[0] = price;

   } else {

     price_array = new int[price_array.length + 1];

     price_array[price_array.length + 1] = price;

   }

 }

 public int[] get_price_array() {

   return price_array;

 }

 public static void main(String args[]) {

   System.out.println("Please enter the total number of items to purchase: ");

   Scanner scan = new Scanner(System.in);

   int price = scan.nextInt();

   if (price <= 20) {

     System.out.println("Items being purchased are less than 20");

   } else {

     System.out.println("Items being purchased are more than 20");

   }

   TotalCharge itemsTotal = new TotalCharge();

   itemsTotal.FillPriceArray(price);

   System.out.println(Arrays.toString(itemsTotal.get_price_array()));

 }

}

PYTHON IMPLEMENTATION

calculate_total_charge.py

def FillPriceArray(price):

 price_array.append(price)

price_array = []

price = raw_input("Please enter the total number of items to purchase: ")

try:

 price = int(price)

 if price <= 20:

   print("Items being purchased are less than 20")

 else:

   print("Items being purchased are more than 20")

 FillPriceArray(price)

 print(price_array)

except ValueError:

 print("Invalid input! Exiting..")

8 0
3 years ago
Is majority intent determined by how many times the same type of result is shown on the search engine result page?
laila [671]

According to the search engine algorithm, it is <u>True</u> that the majority intent is determined by how many times the same result is shown on the search engine result page.

<h3>What is Search Intent?</h3>

Search Intent is a term used to describe a user's reason when typing a question or words into a search engine.

Generally, if a user found that no search results match his wants, he would likely not click on any link before performing a similar query search. This would make search engines return with more links that have higher clicks.

<h3>Different types of Search Intent</h3>
  • Informational
  • Commercial
  • Navigation
  • Transactional

Hence, in this case, it is concluded that the correct answer is True.

Learn more about Search Engine here: brainly.com/question/13709771

8 0
3 years ago
Other questions:
  • List three reasons you might use hwinfo when troubleshooting and upgrading a computer
    10·1 answer
  • Canadian Tire is one of Canada’s largest companies. They operate four large distribution centers service over 470 tire retail ou
    5·1 answer
  • For activities with output like below, your output's whitespace (newlines or spaces) must match exactly. See this note. Jump to
    15·1 answer
  • PLEASE HELPPPPPPP
    15·1 answer
  • How dependent are we on technology? ​
    15·2 answers
  • What is the difference between a software engineer and a system analyst?
    8·1 answer
  • Which platform is the best? (X-box, PC, Playstation, Nintendo Switch, Wii)
    10·1 answer
  • 1 Which of the following could work as bits for a binary system?
    9·1 answer
  • I found a brand-new charger wire still in its plastic package, but it's six years old and has never been used. Is it safe to use
    9·1 answer
  • Fullform of mips plz ​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!