Current User Function in SQL

Amrendra Patel
Updated on 22-Aug-2023 16:27:22

547 Views

It is used to return the name of the current user in sql database server. it does not accept any parameter. Syntax CURRENT_USER Current_user is the function used to get the name of current user Example 1 In this example, we are going to use the current_user function to get the current user name. Input Employee Emp_id Name Dept_name Salary 1 Monu IT 50000 2 Sonu HR 60000 3 Golu Security 70000 This database is currently used by amrendra. Code SELECT CURRENT_USER;#selected current user name Output Amrendra ... Read More

Creating Materialised View Using Table Definition in Cassandra

Amrendra Patel
Updated on 22-Aug-2023 16:19:18

124 Views

A materialised is defined as a database object that contains the results of a particular query. It could be called as a subset of a table. Any changes in the base table would be reflected in the materialised view. Syntax CREATE MATERIALISED VIEW view_name AS SELECT * FROM table_name WHERE column_name IS NOT NULL PRIMARY KEY (provide_primary_key) Here, view_name is the name of the materialised view, table_name is the base table, column_name are the columns provide_primary_key are the primary keys for the base table. Example 1 In this example, we are gonna have a ... Read More

Create, Alter & Drop Schema in SQL

Amrendra Patel
Updated on 22-Aug-2023 16:13:08

195 Views

Create a schema Schema is basically the logical representation of the database. there is a default schema named dbo. Objects gets created inside a schema when ‘create schema’ statement is used. To provide access to other user after the schema is created, we need to impersoinate permissions. Syntax:The syntax to create a schema is − Create schema schema_name Here, we have created a schema named schema_name. Example 1: Granting permissions In this example, we are going to create a schema and grant permissions to have access to that. Algorithm Step 1 − Create a schema. Step 2 − ... Read More

Set X-Axis Values in Matplotlib Python

Rishikesh Kumar Rishi
Updated on 22-Aug-2023 16:04:36

77K+ Views

To set X-axis values in matplotlib in Python, we can take the following steps −Create two lists for x and y data points.Get the xticks range value.Plot a line using plot() method with xtick range value and y data points.Replace xticks with X-axis value using xticks() method.To display the figure, use show() method.Examplefrom matplotlib import pyplot as plt plt.rcParams["figure.figsize"] = [7.00, 3.50] plt.rcParams["figure.autolayout"] = True x = [45, 1, 34, 78, 100] y = [8, 10, 23, 78, 2] default_x_ticks = range(len(x)) plt.plot(default_x_ticks, y) plt.xticks(default_x_ticks, x) plt.show()Output

Convert Object to Array of Objects in JavaScript

Nikitasha Shrivastava
Updated on 22-Aug-2023 15:49:17

544 Views

In the given problem statement we are required to convert an object to an array of objects with the help of javascript functionalities. To perform conversion of an object into an array of objects we can use Javascript’s built−in methods. What is an Array in Javascript ? An array is a collection of similar data elements under one roof. So let's understand the overall working process of arrays in JavaScript. An array is an object that contains one or more elements. So it has some properties and methods that make working with arrays easier in JavaScript. For example const ... Read More

Create Login in SQL Server

Amrendra Patel
Updated on 22-Aug-2023 15:09:44

364 Views

A login is a security check process to authenticate the user and make their data secure. In case of SQL, we need to login to connect to the server. Creating login for the server gives a security advantage. Also, security implications are to be understood and kept in mind while creating a login. A user will be granted the access of the database after user login is provided. Here, we are going to use various methods. Method 1: login with Password We are going to use simply the userid and password to login to the server. Syntax Create login ... Read More

Difference Between USB and Ethernet

Md. Sajid
Updated on 22-Aug-2023 15:01:15

2K+ Views

USB and Ethernet are widely used data transfer technologies; however, they differ in their intended usage, data transfer speeds, and maximum cable lengths. Ethernet is capable of transmitting data over far longer distances than USB. Ethernet cables can be up to 100 metres long, although USB cables are normally limited to 5 metres (with some exceptions). Read this article to find out more about USB and Ethernet and how they are different from each other. What is USB? The USB communication protocol is a versatile and extensively used communication protocol that has become a standard for connecting electronic devices. ... Read More

Difference Between EBCDIC and ASCII

Md. Sajid
Updated on 22-Aug-2023 15:01:00

9K+ Views

EBCDIC (Extended Binary Coded Decimal Interchange Code) and ASCII (American Standard Code for Information Interchange) are two-character encoding methods used in digital communication to represent characters. ASCII is a character encoding method that uses a 7-bit code to represent 128 characters, which include letters, numbers, and special characters. EBCDIC has 256 characters and is used to represent a wide variety of characters, such as letters, numbers, special characters, and control characters. Read this article to find out more about EBCDIC and ASCII and how they are different from each other. What is EBCDIC? IBM created EBCDIC (Extended Binary Coded ... Read More

Difference Between FET and MOSFET

Md. Sajid
Updated on 22-Aug-2023 14:59:38

10K+ Views

FETs (Field-Effect Transistor) and MOSFETs (Metal-Oxide-Semiconductor Field-Effect Transistor) are two types of transistors that are used in electronic circuits. FETs and MOSFETs are both three-terminal devices used for signal amplification, switching, and processing. The gate terminal in a FET is separated from the source and drain terminals by a region known as the channel. MOSFETs have an insulated gate terminal separated from the channel by a thin layer of oxide. Read this article to find out more about FET and MOSFET and how they are different from each other. What is FET? The most popular type of FET is the ... Read More

Difference Between Inline and V Engines

Md. Sajid
Updated on 22-Aug-2023 14:58:26

834 Views

An inline engine is a type of engine in which the cylinders are arranged in a straight line along the crankcase. It is also known as a straight engine or straight-four engine. A V engine, often known as a Vee engine, is a form of engine in which the cylinders are placed in two banks at an angle to each other in the shape of a "V". Read this article to find out more about Inline and V Engines and how they are different from each other. What are Inline Engines? An inline engine is a type of internal ... Read More

Advertisements